diff options
author | Christian Svensson <blue@cmd.nu> | 2014-04-29 00:34:59 +0200 |
---|---|---|
committer | Christian Svensson <blue@cmd.nu> | 2014-04-29 16:36:32 +0200 |
commit | 230977a4a571a15fe81b689b1706129d4c4e0daf (patch) | |
tree | 7c45778f77472a72b7ce49215477beafaf9a42c8 /bfd/elf32-or1k.c | |
parent | Fix remote connection to targets that don't support the QNonStop packet. (diff) | |
download | binutils-gdb-230977a4a571a15fe81b689b1706129d4c4e0daf.tar.gz binutils-gdb-230977a4a571a15fe81b689b1706129d4c4e0daf.tar.bz2 binutils-gdb-230977a4a571a15fe81b689b1706129d4c4e0daf.zip |
or1k: Do not override section for non-TLS symbols.
Outgoing section for relocations was computed by setting a shared
pointer to which section should be used. For TLS this was overriden to
use .rela.got since they use GOT entries but since the pointer is per
section that whole section was relocated to .rela.got, even non-TLS
relocations.
* elf32-or1k.c: Fix a bug where non-TLS relocations would be forced
into .rela.got if it contained TLS relocations as well.
Diffstat (limited to 'bfd/elf32-or1k.c')
-rw-r--r-- | bfd/elf32-or1k.c | 11 |
1 files changed, 2 insertions, 9 deletions
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) { |