aboutsummaryrefslogtreecommitdiffstats
path: root/com32/Makefile
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-03-20 16:27:17 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-03-23 16:34:41 +0000
commita0ff1769893dc47028694ee51824bf681672876c (patch)
tree8ef42db23b29ac15055cd1eb6c42f9b8871c6335 /com32/Makefile
parent65377fc66c4e0877a9bcc511cdc92b5a05e23822 (diff)
downloadsyslinux-a0ff1769893dc47028694ee51824bf681672876c.tar.gz
syslinux-a0ff1769893dc47028694ee51824bf681672876c.tar.xz
syslinux-a0ff1769893dc47028694ee51824bf681672876c.zip
core: Shrink core/ldlinux.sys to be under 64K bytes
It would seem that running from a btrfs file system has been broken for some time. The reason is that core/ldlinux.sys has grown substantially, resulting in it weighing in at a whopping 88K bytes and no longer fitting within the first 64K segment of a btrfs file system. This huge size stems from the fact that the core links with libcom32min.a because it requires various symbols contained within that archive but it includes and exports *all* the symbols from libcom32min.a. The reasoning behind this design decision is that when a module is loaded any undefined symbols that are defined in libcom32min.a can be resolved at runtime by the core, without the module also needing to statically link against libcom32min.a. Unfortunately doing this has increased the size of the core beyond acceptable limits, such that booting from a btrfs file system no longer works. This commit links ldlinux.c32 against libcom32min.a so that now ldlinux.c32 exports all the symbols contained within the archive. Since we will always load ldlinux.c32 before any other modules, any undefined symbols will now be resolved by ldlinux.c32 instead of the core. ldlinux.c32 isn't subject to same size constraints as the core, e.g. fitting within 64K. Here are the sizes in bytes before and after this commit, Before: 33806 com32/elflink/ldlinux/ldlinux.c32 87749 core/ldlinux.sys After: 393871 com32/elflink/ldlinux/ldlinux.c32 45516 core/ldlinux.sys Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/Makefile')
-rw-r--r--com32/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/Makefile b/com32/Makefile
index debfe473..6ed2632c 100644
--- a/com32/Makefile
+++ b/com32/Makefile
@@ -1,4 +1,4 @@
-SUBDIRS = elflink/ldlinux libupload tools lib gpllib libutil modules mboot menu samples \
- elflink rosh cmenu hdt gfxboot sysdump lua/src
+SUBDIRS = libupload tools lib elflink/ldlinux gpllib libutil modules mboot \
+ menu samples elflink rosh cmenu hdt gfxboot sysdump lua/src
all tidy dist clean spotless install:
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done