summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2007-07-16 14:10:49 +0200
committerMichael Brown2007-07-16 14:10:49 +0200
commit833d6cc8ececc11e7fd615972e407d0fca425545 (patch)
treeb3c2d0d4f20bc2af9f92fe5001a569d15900c735 /src
parentRevert "no need for depending on build library ("blib")" (diff)
downloadipxe-833d6cc8ececc11e7fd615972e407d0fca425545.tar.gz
ipxe-833d6cc8ececc11e7fd615972e407d0fca425545.tar.xz
ipxe-833d6cc8ececc11e7fd615972e407d0fca425545.zip
Add __bss16() macro, and allow use of .bss16 section by removing
link-time check for section overlaps. (In order to avoid wasting space in the executable image, .bss16 will overlap with the following section, which is .text).
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/Config2
-rw-r--r--src/arch/i386/include/librm.h8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/arch/i386/Config b/src/arch/i386/Config
index 436917f88..b4335b39a 100644
--- a/src/arch/i386/Config
+++ b/src/arch/i386/Config
@@ -130,7 +130,7 @@ endif
# this is almost always a win. the kernel uses it, too.
CFLAGS+= -mpreferred-stack-boundary=2
-LDFLAGS+= -N
+LDFLAGS+= -N --no-check-sections
ifeq "$(shell uname -s)" "FreeBSD"
CFLAGS+= -DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE
diff --git a/src/arch/i386/include/librm.h b/src/arch/i386/include/librm.h
index 9e9498cb9..e583055ea 100644
--- a/src/arch/i386/include/librm.h
+++ b/src/arch/i386/include/librm.h
@@ -27,6 +27,14 @@ extern char *text16;
__attribute__ (( section ( ".data16" ) )) \
_data16_ ## variable array __asm__ ( #variable )
+#define __bss16( variable ) \
+ __attribute__ (( section ( ".bss16" ) )) \
+ _data16_ ## variable __asm__ ( #variable )
+
+#define __bss16_array( variable, array ) \
+ __attribute__ (( section ( ".bss16" ) )) \
+ _data16_ ## variable array __asm__ ( #variable )
+
#define __text16( variable ) \
__attribute__ (( section ( ".text16.data" ) )) \
_text16_ ## variable __asm__ ( #variable )