From a14b1b3d3e375d2e8af8804171ef5e52574dbb2a Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin" <hpa@zytor.com>
Date: Tue, 9 Feb 2016 18:15:50 -0800
Subject: [PATCH] core: Clean up the i386-bios build
Remove symbols and data structures not used in the i386-bios build,
and clean up the linker script so that most internal symbols are
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Upstream: ff859050fa4e6535cae098dc35d88a265466448d
This patch fixes the following build failure with i386 binutils 2.28.1:
/builds/arnout/buildroot/output/host/bin/i586-buildroot-linux-uclibc-ld -Bsymbolic -pie -E --hash-style=gnu -T
/builds/arnout/buildroot/output/build/syslinux-6.03/core/i386/syslinux.ld -M -o ldlinux.elf ldlinux.o \
--start-group libcom32.a --whole-archive /builds/arnout/buildroot/output/build/syslinux-6.03/bios/com32/lib/libcom32core.a libldlinux.a --end-group -N
/builds/arnout/buildroot/output/host/bin/i586-buildroot-linux-uclibc-ld: ldlinux.elf: Not enough room for program headers, try linking with -N
/builds/arnout/buildroot/output/host/bin/i586-buildroot-linux-uclibc-ld: final link failed: Bad value
/builds/arnout/buildroot/output/build/syslinux-6.03/core/Makefile:167: recipe for target 'ldlinux.elf' failed
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
core/i386/syslinux.ld | 287 +++++++++++++++++++++++++-------------------------
3 files changed, 143 insertions(+), 172 deletions(-)
diff --git a/core/extern.inc b/core/extern.inc
index af8eb04c..ce4abfab 100644
extern load_env32, pm_env32_run
extern mp1, mp2, mp3, mp4, mp5
- extern pm_fs_init, pm_searchdir, getfssec, getfsbytes
- extern pm_mangle_name, pm_load_config
- extern pm_open_file, pm_close_file
extern SectorSize, SectorShift