diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 8 |
2 files changed, 13 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dd6ecd9..402cdc4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2018-07-11 Maciej W. Rozycki <macro@mips.com> + Rich Felker <bugdal@aerifal.cx> + + PR ld/22570 + * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather + than `bfd_link_pic' to determine whether dynamic relocations are + to be produced. + (mips_elf_initialize_tls_slots): Likewise. + 2018-07-10 Maciej W. Rozycki <macro@mips.com> * elflink.c (bfd_elf_final_link): Rename `remove' local variable diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 990e3a1..a353907 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -3255,7 +3255,7 @@ mips_tls_got_relocs (struct bfd_link_info *info, unsigned char tls_type, && (!bfd_link_pic (info) || !SYMBOL_REFERENCES_LOCAL (info, h))) indx = h->dynindx; - if ((bfd_link_pic (info) || indx != 0) + if ((bfd_link_dll (info) || indx != 0) && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) @@ -3273,7 +3273,7 @@ mips_tls_got_relocs (struct bfd_link_info *info, unsigned char tls_type, return 1; case GOT_TLS_LDM: - return bfd_link_pic (info) ? 1 : 0; + return bfd_link_dll (info) ? 1 : 0; default: return 0; @@ -3367,7 +3367,7 @@ mips_elf_initialize_tls_slots (bfd *abfd, struct bfd_link_info *info, if (entry->tls_initialized) return; - if ((bfd_link_pic (info) || indx != 0) + if ((bfd_link_dll (info) || indx != 0) && (h == NULL || ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) @@ -3442,7 +3442,7 @@ mips_elf_initialize_tls_slots (bfd *abfd, struct bfd_link_info *info, sgot->contents + got_offset + MIPS_ELF_GOT_SIZE (abfd)); - if (!bfd_link_pic (info)) + if (!bfd_link_dll (info)) MIPS_ELF_PUT_WORD (abfd, 1, sgot->contents + got_offset); else |