summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/i386/scripts/i386.lds10
-rw-r--r--src/drivers/bus/isa.c4
-rw-r--r--src/include/isa.h3
3 files changed, 4 insertions, 13 deletions
diff --git a/src/arch/i386/scripts/i386.lds b/src/arch/i386/scripts/i386.lds
index 9da043d2f..4329164c9 100644
--- a/src/arch/i386/scripts/i386.lds
+++ b/src/arch/i386/scripts/i386.lds
@@ -140,15 +140,7 @@ SECTIONS {
__data = .;
*(.data)
*(.data.*)
-
- /* Various tables. See include/tables.h for an explanation. */
- *(SORT(.tbl.*))
-
-
- isa_drivers = . ;
- *(.drivers.isa)
- isa_drivers_end = .;
-
+ *(SORT(.tbl.*)) /* Various tables. See include/tables.h */
_progbits_end = .;
}
diff --git a/src/drivers/bus/isa.c b/src/drivers/bus/isa.c
index 3766a7395..fb207ba52 100644
--- a/src/drivers/bus/isa.c
+++ b/src/drivers/bus/isa.c
@@ -44,8 +44,8 @@ static isa_probe_addr_t isa_extra_probe_addrs[] = {
* Symbols defined by linker
*
*/
-extern struct isa_driver isa_drivers[];
-extern struct isa_driver isa_drivers_end[];
+static struct isa_driver isa_drivers[0] __table_start ( isa_driver );
+static struct isa_driver isa_drivers_end[0] __table_end ( isa_driver );
/*
* Increment a bus_loc structure to the next possible ISA location.
diff --git a/src/include/isa.h b/src/include/isa.h
index 1a4c87057..9e1dcadf7 100644
--- a/src/include/isa.h
+++ b/src/include/isa.h
@@ -48,14 +48,13 @@ struct isa_driver {
uint16_t mfg_id;
uint16_t prod_id;
};
-#define __isa_driver __attribute__ (( section ( ".drivers.isa" ) ))
/*
* Define an ISA driver
*
*/
#define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id ) \
-static struct isa_driver _name __isa_driver = { \
+static 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, \