diff options
author | Michael Brown | 2006-04-24 20:31:37 +0200 |
---|---|---|
committer | Michael Brown | 2006-04-24 20:31:37 +0200 |
commit | 832e86246b37c78466a5a30159bed48ed59eb811 (patch) | |
tree | c931cdff0738445ba4b5d432784ac11af323b35a /src/include | |
parent | (librm_base-1b) is already an offset; no need to apply OFFSET(). (diff) | |
download | ipxe-832e86246b37c78466a5a30159bed48ed59eb811.tar.gz ipxe-832e86246b37c78466a5a30159bed48ed59eb811.tar.xz ipxe-832e86246b37c78466a5a30159bed48ed59eb811.zip |
gcc is rather over-aggressive about optimising out static data structures
even when __atribute__ (( unused )) is correctly set...
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gpxe/tables.h | 4 | ||||
-rw-r--r-- | src/include/init.h | 12 | ||||
-rw-r--r-- | src/include/isa.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/include/gpxe/tables.h b/src/include/gpxe/tables.h index a565eba7..1fdbbfd7 100644 --- a/src/include/gpxe/tables.h +++ b/src/include/gpxe/tables.h @@ -131,7 +131,7 @@ * ... * } * - * static struct frob my_frobnicator __frobnicator = { + * struct frob my_frobnicator __frobnicator = { * .name = "my_frob", * .frob = my_frob, * }; @@ -184,7 +184,7 @@ * * @code * - * static struct my_foo __table ( foo, 01 ) = { + * struct my_foo __table ( foo, 01 ) = { * ... * }; * diff --git a/src/include/init.h b/src/include/init.h index 71311bfb..3708d923 100644 --- a/src/include/init.h +++ b/src/include/init.h @@ -49,12 +49,12 @@ struct init_fn { #define INIT_RPC 11 /* Macro for creating an initialisation function table entry */ -#define INIT_FN( init_order, init_func, reset_func, exit_func ) \ - static struct init_fn PREFIX_OBJECT(init_fn__) \ - __table ( init_fn, init_order ) = { \ - .init = init_func, \ - .reset = reset_func, \ - .exit = exit_func, \ +#define INIT_FN( init_order, init_func, reset_func, exit_func ) \ + struct init_fn PREFIX_OBJECT(init_fn__) \ + __table ( init_fn, init_order ) = { \ + .init = init_func, \ + .reset = reset_func, \ + .exit = exit_func, \ }; /* Function prototypes */ diff --git a/src/include/isa.h b/src/include/isa.h index 9e1dcadf..eacbb8ef 100644 --- a/src/include/isa.h +++ b/src/include/isa.h @@ -54,7 +54,7 @@ struct isa_driver { * */ #define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id ) \ -static struct isa_driver _name __table(isa_driver,01 ) = { \ +struct isa_driver _name __table(isa_driver,01 ) = { \ .probe_addrs = _probe_addrs, \ .addr_count = sizeof ( _probe_addrs ) / sizeof ( _probe_addrs[0] ), \ .probe_addr = _probe_addr, \ |