kumquat-buildroot/boot/syslinux/0003-Fix-ldlinux.elf-Not-enough-room-for-program-headers-.patch
Benoît Allard 6e432d5ecb syslinux: build with the target toolchain
Until now, the host toolchain was used to build syslinux, as it was
not possible to build a 32-bit syslinux with a x86-64 toolchain.

However, syslinux requires gnu-efi, and gnu-efi is built using the
target toolchain. Mixing different toolchains doesn't work well, so
this commit changes the syslinux package to use the target toolchain
for syslinux as well. This is made possible by patches
0003-Fix-ldlinux.elf-Not-enough-room-for-program-headers-.patch and
0004-memdisk-Force-ld-output-format-to-32-bits.patch.

Since syslinux also contains some utilities that have to run on the
host, those have to continue being built with the host toolchain,
which requires patch 0005-utils-Use-the-host-toolchain-to-build.patch.

Patch 0006-lzo-Use-the-host-toolchain-for-prepcore.patch is about
building prepcore, another utility with the host toolchain as it is
required at build-time.

This was tested using a Buildroot's built x86_64 toolchain, and
checked that the output binaries are 32-bits. It was tested as well if
they actually boot on hardware.

Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-08 16:07:49 +02:00

36 lines
1.3 KiB
Diff

From 61de7762389d460da7ffdd644f50c60175cce23b Mon Sep 17 00:00:00 2001
From: Steve McIntyre <93sam@debian.org>
Date: Wed, 5 Apr 2017 22:09:37 +0200
Subject: [PATCH] Fix 'ldlinux.elf: Not enough room for program headers, try
linking with -N'
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix for https://bugs.debian.org/846679: syslinux: FTBFS: ld:
ldlinux.elf: Not enough room for program headers, try linking with -N
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=846679;filename=syslinux_6.03%2Bdfsg-14.1.debdiff;msg=10
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
---
core/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/Makefile b/core/Makefile
index ad0acb5..58a3545 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -165,7 +165,7 @@ LDSCRIPT = $(SRC)/$(ARCH)/syslinux.ld
%.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS)
$(LD) $(LDFLAGS) -Bsymbolic $(LD_PIE) -E --hash-style=gnu -T $(LDSCRIPT) -M -o $@ $< \
- --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group \
+ --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group --no-dynamic-linker \
> $(@:.elf=.map)
$(OBJDUMP) -h $@ > $(@:.elf=.sec)
$(PERL) $(SRC)/lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec) $(@:.elf=.lst)
--
2.7.4