Bladeren bron

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 17 jaren geleden
bovenliggende
commit
833d6cc8ec
2 gewijzigde bestanden met toevoegingen van 9 en 1 verwijderingen
  1. 1
    1
      src/arch/i386/Config
  2. 8
    0
      src/arch/i386/include/librm.h

+ 1
- 1
src/arch/i386/Config Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 )

Laden…
Annuleren
Opslaan