From b6f7b8df4eb95bff5c662519afb285014ab509c1 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Tue, 20 Mar 2018 10:55:53 +0100 Subject: [ARM] FDPIC: Make _GLOBAL_OFFSET_TABLE_ a relative symbol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2018-XX-XX Christophe Lyon Mickaël Guêné 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 c2f4804..b72e397 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -17086,10 +17086,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; -- cgit v1.1