mirror of
https://github.com/ipxe/ipxe
synced 2026-05-04 03:03:43 +03:00
gcc is rather over-aggressive about optimising out static data structures
even when __atribute__ (( unused )) is correctly set...
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include "init.h"
|
||||
#include "vga.h"
|
||||
|
||||
static struct console_driver vga_console;
|
||||
struct console_driver vga_console;
|
||||
|
||||
static char *vidmem; /* The video buffer */
|
||||
static int video_line, video_col;
|
||||
@@ -94,7 +94,7 @@ static void vga_putc(int byte)
|
||||
write_crtc((video_col + (video_line *COLS)) & 0x0ff, CRTC_CURSOR_LO);
|
||||
}
|
||||
|
||||
static struct console_driver vga_console __console_driver = {
|
||||
struct console_driver vga_console __console_driver = {
|
||||
.putchar = vga_putc,
|
||||
.disabled = 1,
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ static int bios_iskey ( void ) {
|
||||
return ( ( flags & ZF ) == 0 );
|
||||
}
|
||||
|
||||
static struct console_driver bios_console __console_driver = {
|
||||
struct console_driver bios_console __console_driver = {
|
||||
.putchar = bios_putchar,
|
||||
.getchar = bios_getchar,
|
||||
.iskey = bios_iskey,
|
||||
|
||||
@@ -404,7 +404,7 @@ static int nbi_boot ( void *context ) {
|
||||
}
|
||||
|
||||
/** Declaration of the NBI image format */
|
||||
static struct image nbi_image __image = {
|
||||
struct image nbi_image __image = {
|
||||
.name = "NBI",
|
||||
.probe = nbi_probe,
|
||||
.load = nbi_load,
|
||||
|
||||
@@ -15,10 +15,10 @@ struct post_reloc_fn {
|
||||
#define POST_RELOC_LIBRM 00
|
||||
|
||||
/* Macro for creating a post-relocation function table entry */
|
||||
#define POST_RELOC_FN( order, post_reloc_func ) \
|
||||
static struct post_reloc_fn PREFIX_OBJECT(post_reloc_fn__) \
|
||||
__table ( post_reloc_fn, order ) = { \
|
||||
.post_reloc = post_reloc_func, \
|
||||
#define POST_RELOC_FN( order, post_reloc_func ) \
|
||||
struct post_reloc_fn PREFIX_OBJECT(post_reloc_fn__) \
|
||||
__table ( post_reloc_fn, order ) = { \
|
||||
.post_reloc = post_reloc_func, \
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user