diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-04-17 07:47:17 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-04-17 07:47:32 -0700 |
commit | e6699019c4f363f804f9646974ab1d5e78785ffc (patch) | |
tree | 1e81c7c4cb6760c4115f4ab0b9cb0d2ef970629e /ld | |
parent | 305d16a9beff2a817ee03b3881da68eb3a29edec (diff) | |
download | gdb-e6699019c4f363f804f9646974ab1d5e78785ffc.zip gdb-e6699019c4f363f804f9646974ab1d5e78785ffc.tar.gz gdb-e6699019c4f363f804f9646974ab1d5e78785ffc.tar.bz2 |
Put soname in the version definition section
commit 902e9fc76a0ec9f642cefa71ef88cca1c675ad54
Author: Maciej W. Rozycki <macro@imgtec.com>
Date: Tue Feb 21 01:46:42 2017 +0000
PR ld/20828: Move symbol version processing ahead of GC symbol sweep
breaks version definition with --version-script --soname. This patch
fixes it by getting soname index before generating the version definition
section.
bfd/
PR ld/21389
* elflink.c (bfd_elf_size_dynamic_sections): Get soname index
before generating the version definition section.
ld/
PR ld/21389
* testsuite/ld-elf/pr21389.map: New file.
* testsuite/ld-elf/pr21389.s: Likewise.
* testsuite/ld-elf/pr21389a.d: Likewise.
* testsuite/ld-elf/pr21389b.d: Likewise.
* testsuite/ld-elf/pr21389c.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr21389.map | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr21389.s | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr21389a.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr21389b.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr21389c.d | 8 |
6 files changed, 46 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 793847d..a5732a5 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2017-04-17 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/21389 + * testsuite/ld-elf/pr21389.map: New file. + * testsuite/ld-elf/pr21389.s: Likewise. + * testsuite/ld-elf/pr21389a.d: Likewise. + * testsuite/ld-elf/pr21389b.d: Likewise. + * testsuite/ld-elf/pr21389c.d: Likewise. + 2017-04-17 Alan Modra <amodra@gmail.com> * testsuite/ld-elf/indirect5a.c, diff --git a/ld/testsuite/ld-elf/pr21389.map b/ld/testsuite/ld-elf/pr21389.map new file mode 100644 index 0000000..88c8c28 --- /dev/null +++ b/ld/testsuite/ld-elf/pr21389.map @@ -0,0 +1,6 @@ +FOO { +global: + foo; +local: + *; +}; diff --git a/ld/testsuite/ld-elf/pr21389.s b/ld/testsuite/ld-elf/pr21389.s new file mode 100644 index 0000000..a943cc6 --- /dev/null +++ b/ld/testsuite/ld-elf/pr21389.s @@ -0,0 +1,5 @@ + .globl foo + .type foo,%object + .data +foo: + .long 0 diff --git a/ld/testsuite/ld-elf/pr21389a.d b/ld/testsuite/ld-elf/pr21389a.d new file mode 100644 index 0000000..2dcd175 --- /dev/null +++ b/ld/testsuite/ld-elf/pr21389a.d @@ -0,0 +1,10 @@ +#source: pr21389.s +#ld: -shared --version-script pr21389.map -soname=pr21389.so +#objdump: -p +#target: *-*-linux* *-*-gnu* + +#... +Version definitions: +1 0x01 0x[0-9a-f]* pr21389.so +2 0x00 0x[0-9a-f]* FOO +#pass diff --git a/ld/testsuite/ld-elf/pr21389b.d b/ld/testsuite/ld-elf/pr21389b.d new file mode 100644 index 0000000..8dbc34b --- /dev/null +++ b/ld/testsuite/ld-elf/pr21389b.d @@ -0,0 +1,8 @@ +#source: pr21389.s +#ld: -shared --version-script pr21389.map -soname=pr21389.so +#readelf: -d +#target: *-*-linux* *-*-gnu* + +#... + 0x[0-9a-f]* \(SONAME\) +Library soname: \[pr21389.so\] +#pass diff --git a/ld/testsuite/ld-elf/pr21389c.d b/ld/testsuite/ld-elf/pr21389c.d new file mode 100644 index 0000000..76ac37b --- /dev/null +++ b/ld/testsuite/ld-elf/pr21389c.d @@ -0,0 +1,8 @@ +#source: pr21389.s +#ld: -shared -soname=pr21389.so +#readelf: -d +#target: *-*-linux* *-*-gnu* + +#... + 0x[0-9a-f]* \(SONAME\) +Library soname: \[pr21389.so\] +#pass |