diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-09-16 01:17:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-09-16 01:17:16 +0000 |
commit | 1a766c6843ce0005fee23633b3b30c98e81a7b07 (patch) | |
tree | edbea425f1029e549fe635c8ce82f666dc6ef977 /ld | |
parent | fd91d41947667d30f47b06c45cc57d4b4fcefade (diff) | |
download | gdb-1a766c6843ce0005fee23633b3b30c98e81a7b07.zip gdb-1a766c6843ce0005fee23633b3b30c98e81a7b07.tar.gz gdb-1a766c6843ce0005fee23633b3b30c98e81a7b07.tar.bz2 |
Also hide symbols without PLT nor GOT references.
bfd/
2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13177
* elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
nor GOT references.
ld/testsuite/
2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13177
* ld-elf/pr13177.d: New.
* ld-elf/pr13177.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr13177.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr13177.s | 9 |
3 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 7a90b26..c5349be 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2011-09-15 H.J. Lu <hongjiu.lu@intel.com> + PR ld/13177 + * ld-elf/pr13177.d: New. + * ld-elf/pr13177.s: Likewise. + +2011-09-15 H.J. Lu <hongjiu.lu@intel.com> + PR ld/12975 * ld-elf/pr12975.d: New. * ld-elf/pr12975.s: Likewise. diff --git a/ld/testsuite/ld-elf/pr13177.d b/ld/testsuite/ld-elf/pr13177.d new file mode 100644 index 0000000..425a239 --- /dev/null +++ b/ld/testsuite/ld-elf/pr13177.d @@ -0,0 +1,11 @@ +#source: pr13177.s +#ld: --gc-sections -shared +#readelf: -s -D --wide +#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-* +# generic linker targets don't support --gc-sections, nor do a bunch of others + +#failif +#... +.*: 0+0 +0 +NOTYPE +GLOBAL +DEFAULT +UND bar +#... diff --git a/ld/testsuite/ld-elf/pr13177.s b/ld/testsuite/ld-elf/pr13177.s new file mode 100644 index 0000000..25232ba --- /dev/null +++ b/ld/testsuite/ld-elf/pr13177.s @@ -0,0 +1,9 @@ + .section .text.foo,"ax",%progbits + .globl foo + .type foo, %function +foo: + .byte 0 + .section .text.opt_out,"ax",%progbits + .type opt_out, %function +opt_out: + .dc.a bar |