2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 23:31:39 +00:00

console.c uses the generic table mechanism

This commit is contained in:
Michael Brown 2005-04-27 11:38:43 +00:00
parent 69f09ebdd8
commit 3e5bf5fb06
3 changed files with 8 additions and 10 deletions

View File

@ -141,7 +141,10 @@ SECTIONS {
*(.data)
*(.data.*)
/* Various tables */
/* Various tables. See include/tables.h for an explanation. */
*(SORT(.tbl.*))
device_drivers = .;
*(.drivers.device)
device_drivers_end = .;
@ -154,15 +157,9 @@ SECTIONS {
type_drivers = .;
*(.drivers.type)
type_drivers_end = .;
console_drivers = .;
*(.drivers.console)
console_drivers_end = .;
post_reloc_fns = .;
*(SORT(.post_reloc_fns.*))
post_reloc_fns_end = .;
init_fns = .;
*(SORT(.init_fns.*))
init_fns_end = .;
_progbits_end = .;
}

View File

@ -18,8 +18,8 @@
*/
#include "bios.h"
extern struct console_driver console_drivers[];
extern struct console_driver console_drivers_end[];
static struct console_driver console_drivers[0] __table_start ( console );
static struct console_driver console_drivers_end[0] __table_end ( console );
/*****************************************************************************
* putchar : write a single character to each console

View File

@ -3,6 +3,7 @@
#include "stdint.h"
#include "vsprintf.h"
#include "tables.h"
/*
* Consoles that cannot be used before their INIT_FN() has completed
@ -18,7 +19,7 @@ struct console_driver {
};
#define __console_driver \
__attribute__ (( used, __section__ ( ".drivers.console" ) ))
__attribute__ (( used, __table_section ( console, 01 ) ))
/* Function prototypes */