aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-09-03 10:49:57 +0930
committerAlan Modra <amodra@gmail.com>2018-09-03 12:54:35 +0930
commit0d9a433be406220413671495a9b0fab577a48b5e (patch)
treebca0066dfeed38bda771992492e52a652ebf0294 /ld
parentec8da87a225ae9f86cf47765bcc56d6afa30d835 (diff)
downloadgdb-0d9a433be406220413671495a9b0fab577a48b5e.zip
gdb-0d9a433be406220413671495a9b0fab577a48b5e.tar.gz
gdb-0d9a433be406220413671495a9b0fab577a48b5e.tar.bz2
Re: ld: Lookup section in output with the same name
Fixes pr23591 test failures on hppa64-hpux and score-elf, and xfails frv-linux and lm32-linux. PR ld/23591 * testsuite/ld-elf/pr23591a.s, * testsuite/ld-elf/pr23591b.s, * testsuite/ld-elf/pr23591c.s: Don't start directives in first column. * testsuite/ld-elf/pr23591.d: xfail frv-linux and lm32-linux. Allow __start___sancov_cntrs as a local symbol.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/testsuite/ld-elf/pr23591.d5
-rw-r--r--ld/testsuite/ld-elf/pr23591a.s12
-rw-r--r--ld/testsuite/ld-elf/pr23591b.s6
-rw-r--r--ld/testsuite/ld-elf/pr23591c.s12
5 files changed, 28 insertions, 16 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 8736047..486aa26 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,12 @@
+2018-09-03 Alan Modra <amodra@gmail.com>
+
+ PR ld/23591
+ * testsuite/ld-elf/pr23591a.s,
+ * testsuite/ld-elf/pr23591b.s,
+ * testsuite/ld-elf/pr23591c.s: Don't start directives in first column.
+ * testsuite/ld-elf/pr23591.d: xfail frv-linux and lm32-linux.
+ Allow __start___sancov_cntrs as a local symbol.
+
018-08-31 H.J. Lu <hongjiu.lu@intel.com>
PR ld/23591
diff --git a/ld/testsuite/ld-elf/pr23591.d b/ld/testsuite/ld-elf/pr23591.d
index e002d73..e5a7475 100644
--- a/ld/testsuite/ld-elf/pr23591.d
+++ b/ld/testsuite/ld-elf/pr23591.d
@@ -3,7 +3,10 @@
#source: pr23591c.s
#ld: -e _start
#readelf: -sW
+#xfail: frv-*-linux* lm32-*-linux*
+# frv-linux and lm32-linux fail with complaints about emitting dynamic
+# relocations in read-only sections.
#...
- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +HIDDEN +[0-9]+ +___?start___sancov_cntrs
+ +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +(GLOBAL +HIDDEN|LOCAL +DEFAULT) +[0-9]+ +___?start___sancov_cntrs
#pass
diff --git a/ld/testsuite/ld-elf/pr23591a.s b/ld/testsuite/ld-elf/pr23591a.s
index ebdb7f8..7616b13 100644
--- a/ld/testsuite/ld-elf/pr23591a.s
+++ b/ld/testsuite/ld-elf/pr23591a.s
@@ -1,14 +1,14 @@
-.ifdef UNDERSCORE
+ .ifdef UNDERSCORE
.hidden ___start___sancov_cntrs
-.else
+ .else
.hidden __start___sancov_cntrs
-.endif
+ .endif
.text
.globl _start
.type _start, %function
_start:
-.ifdef UNDERSCORE
+ .ifdef UNDERSCORE
.dc.a ___start___sancov_cntrs
-.else
+ .else
.dc.a __start___sancov_cntrs
-.endif
+ .endif
diff --git a/ld/testsuite/ld-elf/pr23591b.s b/ld/testsuite/ld-elf/pr23591b.s
index 646e681..4ab48fb 100644
--- a/ld/testsuite/ld-elf/pr23591b.s
+++ b/ld/testsuite/ld-elf/pr23591b.s
@@ -1,11 +1,11 @@
.section .text,"axG",%progbits,foo1,comdat
-.ifdef UNDERSCORE
+ .ifdef UNDERSCORE
.globl _foo1
.type _foo1, %function
_foo1:
-.else
+ .else
.globl foo1
.type foo1, %function
foo1:
-.endif
+ .endif
.byte 0
diff --git a/ld/testsuite/ld-elf/pr23591c.s b/ld/testsuite/ld-elf/pr23591c.s
index 338671c..695b218 100644
--- a/ld/testsuite/ld-elf/pr23591c.s
+++ b/ld/testsuite/ld-elf/pr23591c.s
@@ -1,26 +1,26 @@
.section __sancov_cntrs,"aG",%progbits,foo1,comdat
.long 0
.section .text,"axG",%progbits,foo1,comdat
-.ifdef UNDERSCORE
+ .ifdef UNDERSCORE
.globl _foo1
.type _foo1, %function
_foo1:
-.else
+ .else
.globl foo1
.type foo1, %function
foo1:
-.endif
+ .endif
.long 0
.section __sancov_cntrs,"aG",%progbits,foo2,comdat
.long 1
.section .text,"axG",%progbits,foo2,comdat
-.ifdef UNDERSCORE
+ .ifdef UNDERSCORE
.globl _foo2
.type _foo2, %function
_foo2:
.long 1
-.else
+ .else
.globl foo2
.type foo2, %function
foo2:
-.endif
+ .endif