diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ccbc820909f..fb0582efd4d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2013-08-14 John Tytgat <john@bass-software.com> + + PR ld/15787 + * elf32-arm.c (elf32_arm_final_link_relocate): Use origin of output + segment containing the relocating symbol instead of assuming 0 for + sb group relocations. + 2013-08-09 Nick Clifton <nickc@redhat.com> * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if G10 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 4616ae9c77c..6d2d5534b14 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -9853,7 +9853,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, bfd_vma pc = input_section->output_section->vma + input_section->output_offset + rel->r_offset; /* sb is the origin of the *segment* containing the symbol. */ - bfd_vma sb = sym_sec->output_section->vma; + bfd_vma sb = sym_sec ? sym_sec->output_section->vma : 0; bfd_vma residual; bfd_vma g_n; bfd_signed_vma signed_value; @@ -9987,7 +9987,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, bfd_vma pc = input_section->output_section->vma + input_section->output_offset + rel->r_offset; /* sb is the origin of the *segment* containing the symbol. */ - bfd_vma sb = sym_sec->output_section->vma; + bfd_vma sb = sym_sec ? sym_sec->output_section->vma : 0; bfd_vma residual; bfd_signed_vma signed_value; int group = 0; @@ -10071,7 +10071,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, bfd_vma pc = input_section->output_section->vma + input_section->output_offset + rel->r_offset; /* sb is the origin of the *segment* containing the symbol. */ - bfd_vma sb = sym_sec->output_section->vma; + bfd_vma sb = sym_sec ? sym_sec->output_section->vma : 0; bfd_vma residual; bfd_signed_vma signed_value; int group = 0; @@ -10155,7 +10155,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, bfd_vma pc = input_section->output_section->vma + input_section->output_offset + rel->r_offset; /* sb is the origin of the *segment* containing the symbol. */ - bfd_vma sb = sym_sec->output_section->vma; + bfd_vma sb = sym_sec ? sym_sec->output_section->vma : 0; bfd_vma residual; bfd_signed_vma signed_value; int group = 0; |