diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-04-28 05:25:17 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-05-03 10:37:16 -0700 |
commit | 973751eab4d682a4381f3f676dc6a519c2766583 (patch) | |
tree | 622b737492e0a04c4c5cd32029d521d97b1fab2a /gdb/d-lang.c | |
parent | fd5c6c0c91f2214f71ca7011a2e5740100fa7797 (diff) | |
download | gdb-973751eab4d682a4381f3f676dc6a519c2766583.zip gdb-973751eab4d682a4381f3f676dc6a519c2766583.tar.gz gdb-973751eab4d682a4381f3f676dc6a519c2766583.tar.bz2 |
Add a do_assignments hook to ldemul
When ELF relocation check is moved after lang_gc_sections, we should
call bfd_elf_record_link_assignment before ELF relocation check so that
linker defined symbols will be processed earlier to stabilize symbols.
We have to do it in lang_do_assignments just before the call to
lang_do_assignments_1.
bfd/
* elf-bfd.h (_bfd_elf_record_start_stop): New prototype.
* elflink.c (start_stop_symbol): New struct.
(start_stop_symbol_info): Likewise.
(elf_link_collect_start_stop): New function.
(_bfd_elf_record_start_stop): Likewise.
ld/
* ldemul.c (ldemul_do_assignments): New function.
* ldemul.h (ldemul_do_assignments): New prototype.
(ld_emulation_xfer_struct): Add do_assignments.
* ldlang.c (lang_do_assignments): Call ldemul_do_assignments
just before lang_do_assignments_1 in lang_mark_phase_enum.
* emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Initialize
the do_assignments field to NULL.
* emultempl/armcoff.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/beos.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/generic.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/gld960.em (ld_gld960_emulation): Likewise.
* emultempl/gld960c.em (ld_gld960coff_emulation): Likewise.
* emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/lnk960.em (ld_lnk960_emulation): Likewise.
* emultempl/m68kcoff.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/msp430.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/pe.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/pep.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/sunos.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/ticoff.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/vanilla.em (ld_${EMULATION_NAME}_emulation): Likewise.
* emultempl/elf32.em (ehdr_start): New variable.
(ehdr_start_save): Likewise.
(gld${EMULATION_NAME}_do_assignments): New function.
(gld${EMULATION_NAME}_restore_ehdr_start): Likewise.
(ehdr_start_empty): Removed.
(gld${EMULATION_NAME}_before_allocation): Don't adjust
__ehdr_start here. Call gld${EMULATION_NAME}_restore_ehdr_start
at the end.
(ld_${EMULATION_NAME}_emulation): Initialize the do_assignments
field with gld${EMULATION_NAME}_do_assignments by default.
Diffstat (limited to 'gdb/d-lang.c')
0 files changed, 0 insertions, 0 deletions