diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-08-10 05:17:28 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-08-10 05:17:41 -0700 |
commit | 9b0ac51b22d0cf900f39e17e615bb22e32720f6e (patch) | |
tree | 39644cd7c9bdaf1c6d530f22c56d9c21c422d8d1 /ld | |
parent | 40f3419a8150eac5855ef89bc2ce3532b0372e57 (diff) | |
download | gdb-9b0ac51b22d0cf900f39e17e615bb22e32720f6e.zip gdb-9b0ac51b22d0cf900f39e17e615bb22e32720f6e.tar.gz gdb-9b0ac51b22d0cf900f39e17e615bb22e32720f6e.tar.bz2 |
nm: Remove --with-symbol-versions
Since
commit 7e6e972f74aeac0ebdbd95a7f905d871cd2581de
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Mar 24 04:23:11 2020 -0700
bfd: Display symbol version for nm -D
always displays symbol version for nm, remove --with-symbol-versions and
silently accept it for backward compatibility.
binutils/
PR binutils/26302
* nm.c (with_symbol_versions): Removed.
(long_option_values): Add OPTION_WITH_SYMBOL_VERSIONS.
(long_options): Update --with-symbol-versions entry.
(print_symbol): Remove the with_symbol_versions check.
(main): Add OPTION_WITH_SYMBOL_VERSIONS for backward
compatibility.
* doc/binutils.texi: Remove --with-symbol-versions.
ld/
PR binutils/26302
* testsuite/ld-elf/pr26302.nd: New file.
* testsuite/ld-elf/pr26302.ver: Likewise.
* testsuite/ld-elf/pr26302a.c: Likewise.
* testsuite/ld-elf/pr26302b.c: Likewise.
* testsuite/ld-elf/shared.exp: Run binutils/26302 tests.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr26302.nd | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr26302.ver | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr26302a.c | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr26302b.c | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 18 |
6 files changed, 46 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index db019e2..2539fad 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2020-08-10 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/26302 + * testsuite/ld-elf/pr26302.nd: New file. + * testsuite/ld-elf/pr26302.ver: Likewise. + * testsuite/ld-elf/pr26302a.c: Likewise. + * testsuite/ld-elf/pr26302b.c: Likewise. + * testsuite/ld-elf/shared.exp: Run binutils/26302 tests. + 2020-08-07 David Faust <david.faust@oracle.com> * testsuite/ld-bpf/call-3.s: New file. diff --git a/ld/testsuite/ld-elf/pr26302.nd b/ld/testsuite/ld-elf/pr26302.nd new file mode 100644 index 0000000..1f2fbdf --- /dev/null +++ b/ld/testsuite/ld-elf/pr26302.nd @@ -0,0 +1,3 @@ +#... + +U foo@@FOO +#pass diff --git a/ld/testsuite/ld-elf/pr26302.ver b/ld/testsuite/ld-elf/pr26302.ver new file mode 100644 index 0000000..f2c03ac --- /dev/null +++ b/ld/testsuite/ld-elf/pr26302.ver @@ -0,0 +1,5 @@ +FOO +{ +global: + foo; +}; diff --git a/ld/testsuite/ld-elf/pr26302a.c b/ld/testsuite/ld-elf/pr26302a.c new file mode 100644 index 0000000..cd0130c --- /dev/null +++ b/ld/testsuite/ld-elf/pr26302a.c @@ -0,0 +1,4 @@ +void +foo (void) +{ +} diff --git a/ld/testsuite/ld-elf/pr26302b.c b/ld/testsuite/ld-elf/pr26302b.c new file mode 100644 index 0000000..eae278d --- /dev/null +++ b/ld/testsuite/ld-elf/pr26302b.c @@ -0,0 +1,7 @@ +extern void foo (void); + +void +bar (void) +{ + foo (); +} diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index e9e9012..0149371 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -843,6 +843,24 @@ run_cc_link_tests [list \ {{readelf {--dyn-syms --wide} pr26094-1b.rd}} \ "pr26094-1" \ ] \ + [list \ + "Build pr26302a.so" \ + "-shared -Wl,--version-script=pr26302.ver" \ + "-fPIC" \ + {pr26302a.c} \ + {} \ + "pr26302a.so" + ] \ + [list \ + "Build pr26302b.so" \ + "-shared -Wl,--no-as-needed tmpdir/pr26302a.so" \ + "-fPIC" \ + {pr26302b.c} \ + {{nm {-u} pr26302.nd} \ + {nm {-u -D} pr26302.nd} \ + {nm {-u -D --with-symbol-versions} pr26302.nd}} \ + "pr26302b.so" \ + ] \ ] run_ld_link_tests [list \ |