diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2011-01-17 16:36:15 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2011-01-17 16:36:15 +0000 |
commit | 1e81e12b2c81710f5b098e18d5146d6704100913 (patch) | |
tree | 64e377b08c7566936b5738a81b5ad8d8d21dfa12 /bfd/elf32-arm.c | |
parent | f55af66d6ed6e6ad47757c5fff7ab5df1284ce33 (diff) | |
download | gdb-1e81e12b2c81710f5b098e18d5146d6704100913.zip gdb-1e81e12b2c81710f5b098e18d5146d6704100913.tar.gz gdb-1e81e12b2c81710f5b098e18d5146d6704100913.tar.bz2 |
bfd/
* elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
dynamic relocs for the removed section.
ld/testsuite/
* ld-arm/gc-thumb-lib.s, ld-arm/gc-thumb.s,
ld-arm/gc-thumb.d: New test.
* ld-arm/arm-elf.exp: Run it.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 6fdd500..8e9e30f 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -11277,21 +11277,13 @@ elf32_arm_gc_sweep_hook (bfd * abfd, eh->plt_thumb_refcount--; } - if (r_type == R_ARM_ABS32 - || r_type == R_ARM_REL32 - || r_type == R_ARM_ABS32_NOI - || r_type == R_ARM_REL32_NOI) - for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next) - if (p->sec == sec) - { - p->count -= 1; - if (ELF32_R_TYPE (rel->r_info) == R_ARM_REL32 - || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32_NOI) - p->pc_count -= 1; - if (p->count == 0) - *pp = p->next; - break; - } + for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next) + if (p->sec == sec) + { + /* Everything must go for SEC. */ + *pp = p->next; + break; + } } break; |