[ARM] Implement FDPIC relocations.
This is the main BFD patch, that enables the linker to actually handle the FDPIC relocations. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * elf32-arm.c (struct fdpic_local): New. (elf_arm_obj_tdata): Add local_fdpic_cnts field. (elf32_arm_local_fdpic_cnts): New. (struct fdpic_global): New. (elf32_arm_link_hash_entry): Add fdpic_cnts field. (elf32_arm_link_hash_table): Add srofixup field. (arm_elf_add_rofixup): New. (arm_elf_fill_funcdesc): New. (elf32_arm_link_hash_newfunc): Handle fdpic_cnts. (elf32_arm_allocate_local_sym_info): Likewise. (create_got_section): Create .rofixup section. (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts. (bfd_elf32_arm_set_target_params): Handle FDPIC. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_arch_local_syms): Likewise. (elf32_arm_fdpic_omit_section_dynsym): New. ld/ * emulparams/armelf_linux_fdpiceabi.sh: Add .rofixup section.
This commit is contained in:
parent
188fd7aea6
commit
e8b09b8710
@ -1,3 +1,27 @@
|
||||
2018-04-25 Christophe Lyon <christophe.lyon@st.com>
|
||||
Mickaël Guêné <mickael.guene@st.com>
|
||||
|
||||
* elf32-arm.c (struct fdpic_local): New.
|
||||
(elf_arm_obj_tdata): Add local_fdpic_cnts field.
|
||||
(elf32_arm_local_fdpic_cnts): New.
|
||||
(struct fdpic_global): New.
|
||||
(elf32_arm_link_hash_entry): Add fdpic_cnts field.
|
||||
(elf32_arm_link_hash_table): Add srofixup field.
|
||||
(arm_elf_add_rofixup): New.
|
||||
(arm_elf_fill_funcdesc): New.
|
||||
(elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
|
||||
(elf32_arm_allocate_local_sym_info): Likewise.
|
||||
(create_got_section): Create .rofixup section.
|
||||
(elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
|
||||
(bfd_elf32_arm_set_target_params): Handle FDPIC.
|
||||
(elf32_arm_final_link_relocate): Likewise.
|
||||
(elf32_arm_check_relocs): Likewise.
|
||||
(allocate_dynrelocs_for_symbol): Likewise.
|
||||
(elf32_arm_size_dynamic_sections): Likewise.
|
||||
(elf32_arm_finish_dynamic_sections): Likewise.
|
||||
(elf32_arm_output_arch_local_syms): Likewise.
|
||||
(elf32_arm_fdpic_omit_section_dynsym): New.
|
||||
|
||||
2018-04-25 Christophe Lyon <christophe.lyon@st.com>
|
||||
Mickaël Guêné <mickael.guene@st.com>
|
||||
|
||||
|
725
bfd/elf32-arm.c
725
bfd/elf32-arm.c
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,8 @@
|
||||
2018-04-25 Christophe Lyon <christophe.lyon@st.com>
|
||||
Mickaël Guêné <mickael.guene@st.com>
|
||||
|
||||
* emulparams/armelf_linux_fdpiceabi.sh: Add .rofixup section.
|
||||
|
||||
2018-04-25 Christophe Lyon <christophe.lyon@st.com>
|
||||
Mickaël Guêné <mickael.guene@st.com>
|
||||
|
||||
|
@ -9,5 +9,9 @@ OTHER_READONLY_SECTIONS="
|
||||
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
|
||||
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
|
||||
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }
|
||||
.rofixup : {
|
||||
${RELOCATING+__ROFIXUP_LIST__ = .;}
|
||||
*(.rofixup)
|
||||
${RELOCATING+__ROFIXUP_END__ = .;}
|
||||
}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user