This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[ARM-FDPIC 09/12] [ARM] FDPIC: Make _GLOBAL_OFFSET_TABLE_ a relative symbol
- From: Christophe Lyon <christophe dot lyon at st dot com>
- To: <binutils at sourceware dot org>
- Date: Thu, 22 Mar 2018 15:38:27 +0100
- Subject: [ARM-FDPIC 09/12] [ARM] FDPIC: Make _GLOBAL_OFFSET_TABLE_ a relative symbol
- References: <20180322143850.1766-1-christophe.lyon@st.com>
2018-XX-XX Christophe Lyon <christophe.lyon@st.com>
Mickaël Guêné <mickael.guene@st.com>
bfd/
* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
_GLOBAL_OFFSET_TABLE_ in FDPIC mode.
---
bfd/elf32-arm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 72d25c8..b1beb32 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -17089,10 +17089,10 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd,
}
/* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. On VxWorks,
- the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it is relative
- to the ".got" section. */
+ and for FDPIC, the _GLOBAL_OFFSET_TABLE_ symbol is not absolute:
+ it is relative to the ".got" section. */
if (h == htab->root.hdynamic
- || (!htab->vxworks_p && h == htab->root.hgot))
+ || (!htab->fdpic_p && !htab->vxworks_p && h == htab->root.hgot))
sym->st_shndx = SHN_ABS;
return TRUE;
--
2.6.3