Преглед изворни кода

Move uninitialised .data16 variables to .bss16; saves around 2000

bytes of useless zeroes in the final image.
tags/v0.9.3
Michael Brown пре 17 година
родитељ
комит
6d2e4e719c

+ 1
- 1
src/arch/i386/core/basemem_packet.c Прегледај датотеку

@@ -27,4 +27,4 @@
27 27
 #include <basemem_packet.h>
28 28
 
29 29
 #undef basemem_packet
30
-char __data16_array ( basemem_packet, [BASEMEM_PACKET_LEN] );
30
+char __bss16_array ( basemem_packet, [BASEMEM_PACKET_LEN] );

+ 2
- 2
src/arch/i386/drivers/net/undiload.c Прегледај датотеку

@@ -36,11 +36,11 @@
36 36
  */
37 37
 
38 38
 /** Parameter block for calling UNDI loader */
39
-static struct s_UNDI_LOADER __data16 ( undi_loader );
39
+static struct s_UNDI_LOADER __bss16 ( undi_loader );
40 40
 #define undi_loader __use_data16 ( undi_loader )
41 41
 
42 42
 /** UNDI loader entry point */
43
-static SEGOFF16_t __data16 ( undi_loader_entry );
43
+static SEGOFF16_t __bss16 ( undi_loader_entry );
44 44
 #define undi_loader_entry __use_data16 ( undi_loader_entry )
45 45
 
46 46
 /**

+ 2
- 2
src/arch/i386/drivers/net/undinet.c Прегледај датотеку

@@ -136,7 +136,7 @@ undinet_function_name ( unsigned int function ) {
136 136
  * Used as the paramter block for all UNDI API calls.  Resides in base
137 137
  * memory.
138 138
  */
139
-static union u_PXENV_ANY __data16 ( undinet_params );
139
+static union u_PXENV_ANY __bss16 ( undinet_params );
140 140
 #define undinet_params __use_data16 ( undinet_params )
141 141
 
142 142
 /** UNDI entry point
@@ -144,7 +144,7 @@ static union u_PXENV_ANY __data16 ( undinet_params );
144 144
  * Used as the indirection vector for all UNDI API calls.  Resides in
145 145
  * base memory.
146 146
  */
147
-SEGOFF16_t __data16 ( undinet_entry_point );
147
+SEGOFF16_t __bss16 ( undinet_entry_point );
148 148
 #define undinet_entry_point __use_data16 ( undinet_entry_point )
149 149
 
150 150
 /**

+ 1
- 1
src/arch/i386/firmware/pcbios/memmap.c Прегледај датотеку

@@ -49,7 +49,7 @@ struct e820_entry {
49 49
 #define E820_TYPE_NVS		4 /**< ACPI NVS memory */
50 50
 
51 51
 /** Buffer for INT 15,e820 calls */
52
-static struct e820_entry __data16 ( e820buf );
52
+static struct e820_entry __bss16 ( e820buf );
53 53
 #define e820buf __use_data16 ( e820buf )
54 54
 
55 55
 /**

+ 3
- 3
src/arch/i386/image/multiboot.c Прегледај датотеку

@@ -195,7 +195,7 @@ multiboot_build_module_list ( struct image *image,
195 195
  * along with the other structures belonging to the Multiboot
196 196
  * information table.
197 197
  */
198
-static struct multiboot_info __data16 ( mbinfo );
198
+static struct multiboot_info __bss16 ( mbinfo );
199 199
 #define mbinfo __use_data16 ( mbinfo )
200 200
 
201 201
 /** The multiboot bootloader name */
@@ -204,11 +204,11 @@ static char __data16_array ( mb_bootloader_name, [] ) = "gPXE " VERSION;
204 204
 
205 205
 /** The multiboot memory map */
206 206
 static struct multiboot_memory_map
207
-	__data16_array ( mbmemmap, [MAX_MEMORY_REGIONS] );
207
+	__bss16_array ( mbmemmap, [MAX_MEMORY_REGIONS] );
208 208
 #define mbmemmap __use_data16 ( mbmemmap )
209 209
 
210 210
 /** The multiboot module list */
211
-static struct multiboot_module __data16_array ( mbmodules, [MAX_MODULES] );
211
+static struct multiboot_module __bss16_array ( mbmodules, [MAX_MODULES] );
212 212
 #define mbmodules __use_data16 ( mbmodules )
213 213
 
214 214
 /**

+ 1
- 1
src/arch/i386/include/basemem_packet.h Прегледај датотеку

@@ -7,7 +7,7 @@
7 7
 #define BASEMEM_PACKET_LEN 1514
8 8
 
9 9
 /** Base memory packet buffer */
10
-extern char __data16_array ( basemem_packet, [BASEMEM_PACKET_LEN] );
10
+extern char __bss16_array ( basemem_packet, [BASEMEM_PACKET_LEN] );
11 11
 #define basemem_packet __use_data16 ( basemem_packet )
12 12
 
13 13
 #endif /* BASEMEM_PACKET_H */

Loading…
Откажи
Сачувај