aboutsummaryrefslogtreecommitdiff
path: root/ld/Makefile.am
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2019-04-06 07:25:10 -0700
committerH.J. Lu <hjl.tools@gmail.com>2019-04-06 07:25:31 -0700
commit5b9c07b2782fb9368f06c2561b7329c384ec5da0 (patch)
tree7258bdae0c83c09117cd939b2e770521c5604dc6 /ld/Makefile.am
parentd55e5aa6b29906346c51ad00e6a9b112590aa294 (diff)
downloadgdb-5b9c07b2782fb9368f06c2561b7329c384ec5da0.zip
gdb-5b9c07b2782fb9368f06c2561b7329c384ec5da0.tar.gz
gdb-5b9c07b2782fb9368f06c2561b7329c384ec5da0.tar.bz2
x86: Move x86-specific linker options to elf_linker_x86_params
Remove x86-specific linker options from bfd_link_info and put them in elf_linker_x86_params. Add _bfd_elf_linker_x86_set_options to pass x86-specific linker options from ld to bfd. bfd/ * elf-linker-x86.h: New file. * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params to get x86-specific linker options. * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise. (elf_x86_64_check_relocs): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_link_setup_gnu_properties): Likewise. * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise. (_bfd_x86_elf_link_setup_gnu_properties): Likewise. (_bfd_elf_linker_x86_set_options): New function. * elfxx-x86.h: Include "elf-linker-x86.h". (elf_x86_link_hash_table): Add params. include/ * bfdlink.h (bfd_link_info): Remove x86-specific linker options. ld/ * Makefile.am (ELF_X86_DEPS): Add $(srcdir)/emultempl/elf-x86.em. (eelf_i386_sol2.c): Also depend on $(srcdir)/emultempl/solaris2-x86.em. (eelf_x86_64_sol2.c): Likewise. * Makefile.in: Regenerated. * emulparams/call_nop.sh: Set x86-specific linker options via params. * emulparams/cet.sh: Likewise. * emulparams/reloc_overflow.sh: Likewise. * emulparams/elf32_x86_64.sh (EXTRA_EM_FILE): New. Set to "elf-x86". * emulparams/elf_i386.sh: Likewise. * emulparams/elf_i386_be.sh: Likewise. * emulparams/elf_i386_chaos.sh: Likewise. * emulparams/elf_i386_ldso.sh: Likewise. * emulparams/elf_i386_vxworks.sh: Likewise. * emulparams/elf_iamcu.sh: Likewise. * emulparams/elf_k1om.sh: Likewise. * emulparams/elf_l1om.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/elf_i386_sol2.sh (EXTRA_EM_FILE): Changed to "solaris2-x86". * emulparams/elf_x86_64_sol2.sh: Likewise. * emultempl/elf-x86.em: New file. * emultempl/solaris2-x86.em: Likewise. * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Don't set link_info.call_nop_byte.
Diffstat (limited to 'ld/Makefile.am')
-rw-r--r--ld/Makefile.am5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/Makefile.am b/ld/Makefile.am
index c2c798b..6d750c8 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -618,7 +618,8 @@ GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}"
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/scripttempl/DWARF.sc
ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em $(srcdir)/scripttempl/DWARF.sc
-ELF_X86_DEPS = $(ELF_DEPS) $(srcdir)/emulparams/plt_unwind.sh \
+ELF_X86_DEPS = $(ELF_DEPS) $(srcdir)/emultempl/elf-x86.em \
+ $(srcdir)/emulparams/plt_unwind.sh \
$(srcdir)/emulparams/extern_protected_data.sh \
$(srcdir)/emulparams/dynamic_undefined_weak.sh \
$(srcdir)/emulparams/reloc_overflow.sh \
@@ -1310,6 +1311,7 @@ eelf_i386_nacl.c: $(srcdir)/emulparams/elf_i386_nacl.sh \
eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \
$(srcdir)/emulparams/solaris2.sh \
$(srcdir)/emultempl/solaris2.em \
+ $(srcdir)/emultempl/solaris2-x86.em \
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
@@ -1866,6 +1868,7 @@ eelf_x86_64_sol2.c: $(srcdir)/emulparams/elf_x86_64_sol2.sh \
$(srcdir)/emulparams/elf_x86_64.sh \
$(srcdir)/emulparams/solaris2.sh \
$(srcdir)/emultempl/solaris2.em \
+ $(srcdir)/emultempl/solaris2-x86.em \
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \