1
0
mirror of https://github.com/pmmp/musl-cross-make.git synced 2024-11-24 10:46:11 +00:00
musl-cross-make/patches/binutils-2.25.1/0009-arm-pie-tls.diff
Rich Felker 684cb17061 update arm static pie TLS relocs patch to upstream version, backport
commit c9ac08753a53eb84c184901a083ee87b1992bd32 omitted a few changes,
resulting in spurious NONE-type relocs and possibly other problems.
update patches to match upstream fix.
2019-10-06 20:47:22 -04:00

48 lines
1.6 KiB
Diff

--- binutils-2.25.1/bfd/elf32-arm.c.orig 2019-10-06 20:40:39.213623570 -0400
+++ binutils-2.25.1/bfd/elf32-arm.c 2019-10-06 20:45:09.688207243 -0400
@@ -4097,7 +4097,7 @@
{
int is_local = (h == NULL);
- if (info->shared || (h && h->root.type == bfd_link_hash_undefweak))
+ if (!info->executable || (h && h->root.type == bfd_link_hash_undefweak))
return r_type;
/* We do not support relaxations for Old TLS models. */
@@ -9493,7 +9493,7 @@
{
/* If we don't know the module number, create a relocation
for it. */
- if (info->shared)
+ if (!info->executable)
{
Elf_Internal_Rela outrel;
@@ -9581,7 +9581,7 @@
now, and emit any relocations. If both an IE GOT and a
GD GOT are necessary, we emit the GD first. */
- if ((info->shared || indx != 0)
+ if ((!info->executable || indx != 0)
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
@@ -9597,7 +9597,7 @@
/* We should have relaxed, unless this is an undefined
weak symbol. */
BFD_ASSERT ((h && (h->root.type == bfd_link_hash_undefweak))
- || info->shared);
+ || !info->executable);
BFD_ASSERT (globals->sgotplt_jump_table_size + offplt + 8
<= globals->root.sgotplt->size);
@@ -13504,7 +13504,7 @@
indx = h->dynindx;
if (tls_type != GOT_NORMAL
- && (info->shared || indx != 0)
+ && (!info->executable || indx != 0)
&& (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
{