diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/arc-got.h | 7 | ||||
-rw-r--r-- | bfd/elf32-arc.c | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9ee1bf4..7fb198a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> + * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to + patched section contents for TLS IE reloc. + * elf32-arc.c: Remove TCB_SIZE preprocessor macro. + +2017-06-08 Cupertino Miranda <cmiranda@synopsys.com> + * elf32-arc.c (elf_arc_relocate_section): Added "call" to RELOC_FOR_GLOBAL_SYMBOL macro. diff --git a/bfd/arc-got.h b/bfd/arc-got.h index b8a6d15..f1f6c0e 100644 --- a/bfd/arc-got.h +++ b/bfd/arc-got.h @@ -22,6 +22,8 @@ #ifndef ARC_GOT_H #define ARC_GOT_H +#define TCB_SIZE (8) + enum tls_type_e { GOT_UNKNOWN = 0, @@ -354,7 +356,8 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p, = tls_sec->output_section->vma; bfd_put_32 (output_bfd, - sym_value - sec_vma, + sym_value - sec_vma + + (elf_hash_table (info)->dynamic_sections_created ? 0 : TCB_SIZE), htab->sgot->contents + entry->offset + (entry->existing_entries == TLS_GOT_MOD_AND_OFF ? 4 : 0)); @@ -478,8 +481,10 @@ GOT_OFFSET = %#lx, GOT_VMA = %#lx, INDEX = %ld, ADDEND = 0x0\n", { bfd_vma addend = 0; if (list->type == GOT_TLS_IE) + { addend = bfd_get_32 (output_bfd, htab->sgot->contents + got_offset); + } ADD_RELA (output_bfd, got, got_offset + (e == TLS_GOT_MOD_AND_OFF ? 4 : 0), diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index f424f13..c1286b2 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -1187,7 +1187,6 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data, #define TLS_REL (bfd_signed_vma) \ ((elf_hash_table (info))->tls_sec->output_section->vma) #define TLS_TBSS (8) -#define TCB_SIZE (8) #define none (0) |