Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/binutils/dist/bfd TLS relocations for PIE and ...
details: https://anonhg.NetBSD.org/src/rev/13804d889140
branches: trunk
changeset: 355321:13804d889140
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Jul 25 19:44:25 2017 +0000
description:
TLS relocations for PIE and non-PIE main executable work the same, so
apply the same relaxation rules and the same static binding rules.
diffstat:
external/gpl3/binutils/dist/bfd/elfxx-sparc.c | 28 +++++++++++++-------------
1 files changed, 14 insertions(+), 14 deletions(-)
diffs (122 lines):
diff -r e102b1f7f633 -r 13804d889140 external/gpl3/binutils/dist/bfd/elfxx-sparc.c
--- a/external/gpl3/binutils/dist/bfd/elfxx-sparc.c Tue Jul 25 18:03:56 2017 +0000
+++ b/external/gpl3/binutils/dist/bfd/elfxx-sparc.c Tue Jul 25 19:44:25 2017 +0000
@@ -1330,7 +1330,7 @@
&& ! _bfd_sparc_elf_tdata (abfd)->has_tlsgd)
r_type = R_SPARC_REV32;
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
return r_type;
switch (r_type)
@@ -1501,13 +1501,13 @@
case R_SPARC_TLS_LE_HIX22:
case R_SPARC_TLS_LE_LOX10:
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
goto r_sparc_plt32;
break;
case R_SPARC_TLS_IE_HI22:
case R_SPARC_TLS_IE_LO10:
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
info->flags |= DF_STATIC_TLS;
/* Fall through */
@@ -2334,7 +2334,7 @@
/* If R_SPARC_TLS_IE_{HI22,LO10} symbol is now local to the binary,
make it a R_SPARC_TLS_LE_{HI22,LO10} requiring no TLS entry. */
if (h->got.refcount > 0
- && !bfd_link_pic (info)
+ && !bfd_link_dll (info)
&& h->dynindx == -1
&& _bfd_sparc_elf_hash_entry(h)->tls_type == GOT_TLS_IE)
h->got.offset = (bfd_vma) -1;
@@ -3582,7 +3582,7 @@
else if (h != NULL)
{
tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
- if (!bfd_link_pic (info)
+ if (!bfd_link_dll (info)
&& h->dynindx == -1
&& tls_type == GOT_TLS_IE)
switch (SPARC_ELF_R_TYPE (rel->r_info))
@@ -3706,7 +3706,7 @@
case R_SPARC_TLS_LDM_HI22:
case R_SPARC_TLS_LDM_LO10:
- if (! bfd_link_pic (info))
+ if (! bfd_link_dll (info))
{
bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
continue;
@@ -3717,7 +3717,7 @@
case R_SPARC_TLS_LDO_HIX22:
case R_SPARC_TLS_LDO_LOX10:
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
{
relocation -= dtpoff_base (info);
break;
@@ -3729,7 +3729,7 @@
case R_SPARC_TLS_LE_HIX22:
case R_SPARC_TLS_LE_LOX10:
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
{
Elf_Internal_Rela outrel;
bfd_boolean skip;
@@ -3761,7 +3761,7 @@
break;
case R_SPARC_TLS_LDM_CALL:
- if (! bfd_link_pic (info))
+ if (! bfd_link_dll (info))
{
/* mov %g0, %o0 */
bfd_put_32 (output_bfd, 0x90100000, contents + rel->r_offset);
@@ -3775,13 +3775,13 @@
tls_type = _bfd_sparc_elf_local_got_tls_type (input_bfd) [r_symndx];
else if (h != NULL)
tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type;
- if (! bfd_link_pic (info)
+ if (! bfd_link_dll (info)
|| (r_type == R_SPARC_TLS_GD_CALL && tls_type == GOT_TLS_IE))
{
Elf_Internal_Rela *rel2;
bfd_vma insn;
- if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
+ if (!bfd_link_dll (info) && (h == NULL || h->dynindx == -1))
{
/* GD -> LE */
bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
@@ -3868,12 +3868,12 @@
continue;
case R_SPARC_TLS_LDM_ADD:
- if (! bfd_link_pic (info))
+ if (! bfd_link_dll (info))
bfd_put_32 (output_bfd, SPARC_NOP, contents + rel->r_offset);
continue;
case R_SPARC_TLS_LDO_ADD:
- if (! bfd_link_pic (info))
+ if (! bfd_link_dll (info))
{
/* Change rs1 into %g7. */
bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
@@ -3884,7 +3884,7 @@
case R_SPARC_TLS_IE_LD:
case R_SPARC_TLS_IE_LDX:
- if (! bfd_link_pic (info) && (h == NULL || h->dynindx == -1))
+ if (! bfd_link_dll (info) && (h == NULL || h->dynindx == -1))
{
bfd_vma insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
int rs2 = insn & 0x1f;
Home |
Main Index |
Thread Index |
Old Index