diff options
author | Christophe Lyon <christophe.lyon@st.com> | 2018-03-20 10:55:53 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2018-04-25 20:58:52 +0000 |
commit | fac7bd6475c4058e7c1e0df29dac50579e427b34 (patch) | |
tree | be8c58b34a168e5c6fa751c8e32b941ae4873a31 | |
parent | 29e9b073e3b356aae4c249bf3e265b2a608aea6c (diff) | |
download | gdb-fac7bd6475c4058e7c1e0df29dac50579e427b34.zip gdb-fac7bd6475c4058e7c1e0df29dac50579e427b34.tar.gz gdb-fac7bd6475c4058e7c1e0df29dac50579e427b34.tar.bz2 |
[ARM] FDPIC: Make _GLOBAL_OFFSET_TABLE_ a relative symbol
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.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 766341a..84d0891 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,6 +1,12 @@ 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> + * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case for R_ARM_TARGET2. 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; |