mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 10:02:42 +03:00
Added post-relocation function table.
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
#ifndef RELOCATE_H
|
||||
#define RELOCATE_H
|
||||
|
||||
#ifdef KEEP_IT_REAL
|
||||
|
||||
/* relocate() is conceptually impossible with KEEP_IT_REAL */
|
||||
#define relocate()
|
||||
#ifndef KEEP_IT_REAL
|
||||
|
||||
#else
|
||||
/* An entry in the post-relocation function table */
|
||||
struct post_reloc_fn {
|
||||
void ( *post_reloc ) ( void );
|
||||
};
|
||||
|
||||
extern void relocate ( void );
|
||||
/* Use double digits to avoid problems with "10" < "9" on alphabetic sort */
|
||||
#define POST_RELOC_LIBRM "00"
|
||||
|
||||
/* Macro for creating a post-relocation function table entry */
|
||||
#define POST_RELOC_FN( post_reloc_order, post_reloc_func ) \
|
||||
static struct post_reloc_fn post_reloc_functions \
|
||||
__attribute__ (( used, __section__( ".post_reloc_fns." \
|
||||
post_reloc_order ) )) = { \
|
||||
.post_reloc = post_reloc_func, \
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user