Browse Source
We should ignore dynamic references on forced local symbols during garbage collection since they can never be referenced dynamically. bfd/ PR ld/22649 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic references on forced local symbols. ld/ PR ld/22649 * testsuite/ld-elf/pr22649-1.s: New file. * testsuite/ld-elf/pr22649-2a.s: Likewise. * testsuite/ld-elf/pr22649-2b.s: Likewise. * testsuite/ld-elf/pr22649.msg: Likewise. * testsuite/ld-elf/shared.exp: Run ld/22649 tests.binutils-2_30-branch
8 changed files with 81 additions and 1 deletions
@ -0,0 +1,4 @@ |
|||
.data |
|||
.globl foo |
|||
foo: |
|||
.dc.a bar |
|||
@ -0,0 +1,8 @@ |
|||
.data |
|||
.hidden foo |
|||
.hidden bar |
|||
.globl foo |
|||
.globl bar |
|||
foo: |
|||
bar: |
|||
.dc.a foo |
|||
@ -0,0 +1,7 @@ |
|||
.data |
|||
.hidden foo |
|||
.globl foo |
|||
.globl bar |
|||
foo: |
|||
bar: |
|||
.dc.a foo |
|||
@ -0,0 +1 @@ |
|||
.*: Removing unused section '\.data' in file 'tmpdir/pr22649-2.*\.o' |
|||
Loading…
Reference in new issue