diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 22 |
2 files changed, 12 insertions, 15 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 00ff8ff..93291ef 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2011-01-17 Richard Sandiford <richard.sandiford@linaro.org> + + * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered + dynamic relocs for the removed section. + 2011-01-15 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32 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; |