tests: fix up the generation of the test pecoff binary for gcc-7.2
newer versions of gcc have contained an efi target for a while so use it instead of hacking a linker script. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
parent
5b79ed2179
commit
bc6ff99d36
3 changed files with 7 additions and 126 deletions
|
@ -10,27 +10,27 @@ check_PROGRAMS = test-x86_64.pecoff test-i386.pecoff
|
|||
check_DATA = $(test_key) $(test_cert)
|
||||
check_SCRIPTS = test-wrapper.sh
|
||||
|
||||
test_i386_pecoff_SOURCES = test.S test-i386.lds
|
||||
test_x86_64_pecoff_SOURCES = test.S test-x86_64.lds
|
||||
test_i386_pecoff_SOURCES = test.S
|
||||
test_x86_64_pecoff_SOURCES = test.S
|
||||
|
||||
test-%.pecoff: test-%.elf
|
||||
$(OBJCOPY) -j .text -j .sdata -j .data \
|
||||
-j .dynamic -j .dynsym -j .rel \
|
||||
-j .rela -j .reloc \
|
||||
--target=efi-app-$(test_image_arch) $^ $@
|
||||
--target=$(test_lds) $^ $@
|
||||
$(STRIP) $@
|
||||
|
||||
test-x86_64.pecoff: test_image_arch = x86-64
|
||||
test-x86_64.pecoff: test_lds = $(srcdir)/test-x86_64.lds
|
||||
test-x86_64.pecoff: test_lds = efi-app-x86_64
|
||||
test-x86_64.pecoff: ASFLAGS += -m64
|
||||
test-x86_64.pecoff: LDFLAGS += -m64
|
||||
test-i386.pecoff: test_image_arch = i386
|
||||
test-i386.pecoff: test_lds = $(srcdir)/test-i386.lds
|
||||
test-i386.pecoff: test_lds = efi-app-ia32
|
||||
test-i386.pecoff: ASFLAGS += -m32
|
||||
test-i386.pecoff: LDFLAGS += -m32
|
||||
|
||||
test-%.elf: LDFLAGS = -nostdlib -T $(test_lds)
|
||||
test-%.elf: test-%.$(OBJEXT) $(test_lds)
|
||||
test-%.elf: LDFLAGS += -nostdlib
|
||||
test-%.elf: test-%.$(OBJEXT)
|
||||
$(LINK) $<
|
||||
|
||||
test-%.$(OBJEXT): $(srcdir)/test.S
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
||||
OUTPUT_ARCH(i386)
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
. = 0;
|
||||
ImageBase = .;
|
||||
.hash : { *(.hash) } /* this MUST come first! */
|
||||
. = ALIGN(4096);
|
||||
.eh_frame :
|
||||
{
|
||||
*(.eh_frame)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.reloc :
|
||||
{
|
||||
*(.reloc)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.data :
|
||||
{
|
||||
*(.rodata*)
|
||||
*(.got.plt)
|
||||
*(.got)
|
||||
*(.data*)
|
||||
*(.sdata)
|
||||
/* the EFI loader doesn't seem to like a .bss section, so we stick
|
||||
it all into .data: */
|
||||
*(.sbss)
|
||||
*(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
*(.rel.local)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.dynamic : { *(.dynamic) }
|
||||
. = ALIGN(4096);
|
||||
.rela :
|
||||
{
|
||||
*(.rela.data*)
|
||||
*(.rela.got)
|
||||
*(.rela.stab)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.dynsym : { *(.dynsym) }
|
||||
. = ALIGN(4096);
|
||||
.dynstr : { *(.dynstr) }
|
||||
. = ALIGN(4096);
|
||||
.ignored.reloc :
|
||||
{
|
||||
*(.rela.reloc)
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
/* Same as elf_x86_64_fbsd_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
|
||||
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
|
||||
OUTPUT_ARCH(i386:x86-64)
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
. = 0;
|
||||
ImageBase = .;
|
||||
.hash : { *(.hash) } /* this MUST come first! */
|
||||
. = ALIGN(4096);
|
||||
.eh_frame :
|
||||
{
|
||||
*(.eh_frame)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.reloc :
|
||||
{
|
||||
*(.reloc)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.data :
|
||||
{
|
||||
*(.rodata*)
|
||||
*(.got.plt)
|
||||
*(.got)
|
||||
*(.data*)
|
||||
*(.sdata)
|
||||
/* the EFI loader doesn't seem to like a .bss section, so we stick
|
||||
it all into .data: */
|
||||
*(.sbss)
|
||||
*(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
*(.rel.local)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.dynamic : { *(.dynamic) }
|
||||
. = ALIGN(4096);
|
||||
.rela :
|
||||
{
|
||||
*(.rela.data*)
|
||||
*(.rela.got)
|
||||
*(.rela.stab)
|
||||
}
|
||||
. = ALIGN(4096);
|
||||
.dynsym : { *(.dynsym) }
|
||||
. = ALIGN(4096);
|
||||
.dynstr : { *(.dynstr) }
|
||||
. = ALIGN(4096);
|
||||
.ignored.reloc :
|
||||
{
|
||||
*(.rela.reloc)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue