Procházet zdrojové kódy

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).
tags/v0.9.3
Michael Brown před 17 roky
rodič
revize
833d6cc8ec
2 změnil soubory, kde provedl 9 přidání a 1 odebrání
  1. 1
    1
      src/arch/i386/Config
  2. 8
    0
      src/arch/i386/include/librm.h

+ 1
- 1
src/arch/i386/Config Zobrazit soubor

@@ -130,7 +130,7 @@ endif
130 130
 # this is almost always a win. the kernel uses it, too.
131 131
 CFLAGS+= -mpreferred-stack-boundary=2
132 132
 
133
-LDFLAGS+=	-N
133
+LDFLAGS+=	-N --no-check-sections
134 134
 
135 135
 ifeq "$(shell uname -s)" "FreeBSD"
136 136
 CFLAGS+=	-DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE

+ 8
- 0
src/arch/i386/include/librm.h Zobrazit soubor

@@ -27,6 +27,14 @@ extern char *text16;
27 27
 	__attribute__ (( section ( ".data16" ) ))			\
28 28
 	_data16_ ## variable array __asm__ ( #variable )
29 29
 
30
+#define __bss16( variable )						\
31
+	__attribute__ (( section ( ".bss16" ) ))			\
32
+	_data16_ ## variable __asm__ ( #variable )
33
+
34
+#define __bss16_array( variable, array )				\
35
+	__attribute__ (( section ( ".bss16" ) ))			\
36
+	_data16_ ## variable array __asm__ ( #variable )
37
+
30 38
 #define __text16( variable )						\
31 39
 	__attribute__ (( section ( ".text16.data" ) ))			\
32 40
 	_text16_ ## variable __asm__ ( #variable )

Načítá se…
Zrušit
Uložit