Add __bss16() macro, and allow use of .bss16 section by removing
authorMichael Brown <mcb30@etherboot.org>
Mon, 16 Jul 2007 12:10:49 +0000 (13:10 +0100)
committerMichael Brown <mcb30@etherboot.org>
Mon, 16 Jul 2007 12:10:49 +0000 (13:10 +0100)
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).

src/arch/i386/Config
src/arch/i386/include/librm.h

index 436917f..b4335b3 100644 (file)
@@ -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
index 9e9498c..e583055 100644 (file)
@@ -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 )