mirror of https://github.com/ipxe/ipxe.git
console.c uses the generic table mechanism
parent
69f09ebdd8
commit
3e5bf5fb06
|
@ -141,7 +141,10 @@ SECTIONS {
|
||||||
*(.data)
|
*(.data)
|
||||||
*(.data.*)
|
*(.data.*)
|
||||||
|
|
||||||
/* Various tables */
|
/* Various tables. See include/tables.h for an explanation. */
|
||||||
|
*(SORT(.tbl.*))
|
||||||
|
|
||||||
|
|
||||||
device_drivers = .;
|
device_drivers = .;
|
||||||
*(.drivers.device)
|
*(.drivers.device)
|
||||||
device_drivers_end = .;
|
device_drivers_end = .;
|
||||||
|
@ -154,15 +157,9 @@ SECTIONS {
|
||||||
type_drivers = .;
|
type_drivers = .;
|
||||||
*(.drivers.type)
|
*(.drivers.type)
|
||||||
type_drivers_end = .;
|
type_drivers_end = .;
|
||||||
console_drivers = .;
|
|
||||||
*(.drivers.console)
|
|
||||||
console_drivers_end = .;
|
|
||||||
post_reloc_fns = .;
|
post_reloc_fns = .;
|
||||||
*(SORT(.post_reloc_fns.*))
|
*(SORT(.post_reloc_fns.*))
|
||||||
post_reloc_fns_end = .;
|
post_reloc_fns_end = .;
|
||||||
init_fns = .;
|
|
||||||
*(SORT(.init_fns.*))
|
|
||||||
init_fns_end = .;
|
|
||||||
|
|
||||||
_progbits_end = .;
|
_progbits_end = .;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
*/
|
*/
|
||||||
#include "bios.h"
|
#include "bios.h"
|
||||||
|
|
||||||
extern struct console_driver console_drivers[];
|
static struct console_driver console_drivers[0] __table_start ( console );
|
||||||
extern struct console_driver console_drivers_end[];
|
static struct console_driver console_drivers_end[0] __table_end ( console );
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* putchar : write a single character to each console
|
* putchar : write a single character to each console
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include "vsprintf.h"
|
#include "vsprintf.h"
|
||||||
|
#include "tables.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Consoles that cannot be used before their INIT_FN() has completed
|
* Consoles that cannot be used before their INIT_FN() has completed
|
||||||
|
@ -18,7 +19,7 @@ struct console_driver {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define __console_driver \
|
#define __console_driver \
|
||||||
__attribute__ (( used, __section__ ( ".drivers.console" ) ))
|
__attribute__ (( used, __table_section ( console, 01 ) ))
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue