aboutsummaryrefslogtreecommitdiff
path: root/bfd/Makefile.in
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2023-08-03 17:22:42 +0200
committerAndreas Schwab <schwab@suse.de>2023-12-05 13:20:27 +0100
commit1b183017aa2fbb73785dc24b4cff32daae942c9c (patch)
treea38cc647f52a6a83f7c496ef7c36cbe04892f579 /bfd/Makefile.in
parentdb4ab410dec3554bf38f69879de2306ce5e25b7e (diff)
downloadgdb-1b183017aa2fbb73785dc24b4cff32daae942c9c.zip
gdb-1b183017aa2fbb73785dc24b4cff32daae942c9c.tar.gz
gdb-1b183017aa2fbb73785dc24b4cff32daae942c9c.tar.bz2
Add basic support for RISC-V 64-bit EFI objects
This adds a new PEI target pei-riscv64-little. Only objdump and objcopy are supported. bfd: * .gitignore: Add pe-riscv64igen.c. * Makefile.am (BFD64_BACKENDS): Add pei-riscv64.lo, pe-riscv64igen.lo. (BFD64_BACKENDS_CFILES): Add pei-riscv64.c. (BUILD_CFILES): Add pe-riscv64igen.c. (pe-riscv64igen.c): New rule. * Makefile.in: Regenerate. * bfd.c (bfd_get_sign_extend_vma): Add pei-riscv64-little. * coff-riscv64.c: New file. * coffcode.h (coff_set_arch_mach_hook, coff_set_flags) (coff_write_object_contents): Add riscv64 (riscv64_pei_vec) support. * config.bfd (targ_selvecs): Add riscv64_pei_vec to all riscv* targets. * configure.ac: Handle riscv64_pei_vec. * configure: Regenerate. * libpei.h (GET_OPTHDR_IMAGE_BASE, PUT_OPTHDR_IMAGE_BASE) (GET_OPTHDR_SIZE_OF_STACK_RESERVE) (PUT_OPTHDR_SIZE_OF_STACK_RESERVE) (GET_OPTHDR_SIZE_OF_STACK_COMMIT, PUT_OPTHDR_SIZE_OF_STACK_COMMIT) (GET_OPTHDR_SIZE_OF_HEAP_RESERVE, PUT_OPTHDR_SIZE_OF_HEAP_RESERVE) (GET_OPTHDR_SIZE_OF_HEAP_COMMIT, PUT_OPTHDR_SIZE_OF_HEAP_COMMIT) (GET_PDATA_ENTRY, _bfd_XX_bfd_copy_private_bfd_data_common) (_bfd_XX_bfd_copy_private_section_data) (_bfd_XX_get_symbol_info, _bfd_XX_only_swap_filehdr_out) (_bfd_XX_print_private_bfd_data_common) (_bfd_XXi_final_link_postscript, _bfd_XXi_only_swap_filehdr_out) (_bfd_XXi_swap_aouthdr_in, _bfd_XXi_swap_aouthdr_out) (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out) (_bfd_XXi_swap_lineno_in, _bfd_XXi_swap_lineno_out) (_bfd_XXi_swap_scnhdr_out, _bfd_XXi_swap_sym_in) (_bfd_XXi_swap_sym_out, _bfd_XXi_swap_debugdir_in) (_bfd_XXi_swap_debugdir_out, _bfd_XXi_write_codeview_record) (_bfd_XXi_slurp_codeview_record) [COFF_WITH_peRiscV64]: Define. (_bfd_peRiscV64_print_ce_compressed_pdata): Declare. * peXXigen.c (_bfd_XXi_swap_aouthdr_in, _bfd_XXi_swap_aouthdr_out) (_bfd_XXi_swap_scnhdr_out, pe_print_pdata) (_bfd_XX_print_private_bfd_data_common) (_bfd_XX_bfd_copy_private_section_data) (_bfd_XXi_final_link_postscript): Support COFF_WITH_peRiscV64. * pei-riscv64.c: New file. * peicode.h (coff_swap_scnhdr_in, pe_ILF_build_a_bfd) (pe_ILF_object_p): Support COFF_WITH_peRiscV64. (jtab): Add dummy entry that traps. * targets.c (_bfd_target_vector): Add riscv64_pei_vec. binutils: * testsuite/binutils-all/riscv/pei-riscv64.d: New. * testsuite/binutils-all/riscv/pei-riscv64.s: New. include: * coff/riscv64.h: New file. * coff/pe.h (IMAGE_FILE_MACHINE_RISCV32) (IMAGE_FILE_MACHINE_RISCV64): Define.
Diffstat (limited to 'bfd/Makefile.in')
-rw-r--r--bfd/Makefile.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index bac78f4..480894f 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1054,10 +1054,12 @@ BFD64_BACKENDS = \
pe-aarch64.lo \
pe-aarch64igen.lo \
pe-loongarch64igen.lo \
+ pe-riscv64igen.lo \
pe-x86_64.lo \
pei-aarch64.lo \
pei-ia64.lo \
pei-loongarch64.lo \
+ pei-riscv64.lo \
pei-x86_64.lo \
pepigen.lo \
pex64igen.lo \
@@ -1103,6 +1105,7 @@ BFD64_BACKENDS_CFILES = \
pei-aarch64.c \
pei-ia64.c \
pei-loongarch64.c \
+ pei-riscv64.c \
pei-x86_64.c \
vms-alpha.c
@@ -1158,7 +1161,8 @@ BUILD_CFILES = \
elf32-ia64.c elf64-ia64.c \
elf32-loongarch.c elf64-loongarch.c \
elf32-riscv.c elf64-riscv.c \
- peigen.c pepigen.c pex64igen.c pe-aarch64igen.c pe-loongarch64igen.c
+ peigen.c pepigen.c pex64igen.c pe-aarch64igen.c pe-loongarch64igen.c \
+ pe-riscv64igen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
SOURCE_HFILES = \
@@ -1705,6 +1709,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-i386.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-loongarch64igen.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-mcore.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-riscv64igen.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-sh.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-x86_64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pef.Plo@am__quote@
@@ -1715,6 +1720,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-ia64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-loongarch64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-mcore.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-riscv64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-sh.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-x86_64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/peigen.Plo@am__quote@
@@ -2414,6 +2420,10 @@ pe-loongarch64igen.c: peXXigen.c
$(AM_V_at)echo "#line 1 \"$<\"" > $@
$(AM_V_GEN)$(SED) -e s/XX/peLoongArch64/g < $< >> $@
+pe-riscv64igen.c: peXXigen.c
+ $(AM_V_at)echo "#line 1 \"peXXigen.c\"" > $@
+ $(AM_V_GEN)$(SED) -e s/XX/peRiscV64/g < $< >> $@
+
host-aout.lo: Makefile
# The following program can be used to generate a simple config file