diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-or1k.c | 11 |
2 files changed, 7 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2a1642d1576..5eb59d32707 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2014-04-29 Christian Svensson <blue@cmd.nu> + + * elf32-or1k.c: Fix a bug where non-TLS relocations would be forced + into .rela.got if it contained TLS relocations as well. + 2014-04-28 Nick Clifton <nickc@redhat.com> PR ld/16821 diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c index c7f1875c4b0..9aa5f543626 100644 --- a/bfd/elf32-or1k.c +++ b/bfd/elf32-or1k.c @@ -1112,6 +1112,8 @@ or1k_elf_relocate_section (bfd *output_bfd, bfd_byte *loc; int dynamic; + sreloc = bfd_get_section_by_name (dynobj, ".rela.got"); + /* Mark as TLS related GOT entry by setting bit 2 as well as bit 1. */ if (h != NULL) @@ -1541,15 +1543,6 @@ or1k_elf_check_relocs (bfd *abfd, return FALSE; } - /* TLS specific. */ - if (ELF32_R_TYPE (rel->r_info) >= R_OR1K_TLS_GD_HI16 && - ELF32_R_TYPE (rel->r_info) <= R_OR1K_TLS_IE_LO16) - { - /* Set which rela section to use. */ - elf_section_data (sec)->sreloc = - bfd_get_section_by_name (dynobj, ".rela.got");; - } - if (ELF32_R_TYPE (rel->r_info) != R_OR1K_GOTOFF_HI16 && ELF32_R_TYPE (rel->r_info) != R_OR1K_GOTOFF_LO16) { |