[tables] Redefine methods for accessing linker tables
authorMichael Brown <mcb30@etherboot.org>
Thu, 12 Mar 2009 19:41:40 +0000 (19:41 +0000)
committerMichael Brown <mcb30@etherboot.org>
Fri, 13 Mar 2009 02:06:30 +0000 (02:06 +0000)
commit1266d7902bf7f2534ee279671d48613ef9b2434c
treea1a5b188148d983fa962a887476259768f1751d4
parent3ed468e0c58bb0eb94925c18a0461cd5014b5777
[tables] Redefine methods for accessing linker tables

Intel's C compiler (icc) chokes on the zero-length arrays that we
currently use as part of the mechanism for accessing linker table
entries.  Abstract away the zero-length arrays, to make a port to icc
easier.

Introduce macros such as for_each_table_entry() to simplify the common
case of iterating over all entries in a linker table.

Represent table names as #defined string constants rather than
unquoted literals; this avoids visual confusion between table names
and C variable or type names, and also allows us to force a
compilation error in the event of incorrect table names.
48 files changed:
src/core/console.c
src/core/device.c
src/core/exec.c
src/core/gdbstub.c
src/core/image.c
src/core/init.c
src/core/main.c
src/core/open.c
src/core/process.c
src/core/resolv.c
src/core/settings.c
src/drivers/bus/eisa.c
src/drivers/bus/isa.c
src/drivers/bus/isapnp.c
src/drivers/bus/mca.c
src/drivers/bus/pci.c
src/hci/shell.c
src/hci/strerror.c
src/hci/tui/settings_ui.c
src/include/console.h
src/include/gpxe/arp.h
src/include/gpxe/command.h
src/include/gpxe/device.h
src/include/gpxe/efi/efi.h
src/include/gpxe/eisa.h
src/include/gpxe/errortab.h
src/include/gpxe/features.h
src/include/gpxe/gdbstub.h
src/include/gpxe/image.h
src/include/gpxe/init.h
src/include/gpxe/isa.h
src/include/gpxe/isapnp.h
src/include/gpxe/mca.h
src/include/gpxe/netdevice.h
src/include/gpxe/open.h
src/include/gpxe/pci.h
src/include/gpxe/process.h
src/include/gpxe/resolv.h
src/include/gpxe/sanboot.h
src/include/gpxe/settings.h
src/include/gpxe/tables.h
src/include/gpxe/tcpip.h
src/interface/efi/efi_init.c
src/net/arp.c
src/net/netdevice.c
src/net/tcpip.c
src/net/udp/dhcp.c
src/usr/autoboot.c