]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[ARM] FDPIC: Make _GLOBAL_OFFSET_TABLE_ a relative symbol
authorChristophe Lyon <christophe.lyon@st.com>
Tue, 20 Mar 2018 09:55:53 +0000 (10:55 +0100)
committerChristophe Lyon <christophe.lyon@linaro.org>
Wed, 25 Apr 2018 20:58:52 +0000 (20:58 +0000)
2018-04-25  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/ChangeLog
bfd/elf32-arm.c

index 766341a54f851cf89afc293c375278b4c024d33d..84d0891086f3bd0167458766d60ceb2f7c15be09 100644 (file)
@@ -1,3 +1,9 @@
+2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
+       Mickaël Guêné  <mickael.guene@st.com>
+
+       * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
+       _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
+
 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
        Mickaël Guêné  <mickael.guene@st.com>
 
index c2f48046200d21fde015d0ec16fdb1e4f8abc9cf..b72e397bcb4d4e5072e763b5614f4c9493f77788 100644 (file)
@@ -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;