You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

relocate.h 721B

12345678910111213141516171819202122232425
  1. #ifndef RELOCATE_H
  2. #define RELOCATE_H
  3. /* relocate() is conceptually impossible with KEEP_IT_REAL */
  4. #ifndef KEEP_IT_REAL
  5. /* An entry in the post-relocation function table */
  6. struct post_reloc_fn {
  7. void ( *post_reloc ) ( void );
  8. };
  9. /* Use double digits to avoid problems with "10" < "9" on alphabetic sort */
  10. #define POST_RELOC_LIBRM "00"
  11. /* Macro for creating a post-relocation function table entry */
  12. #define POST_RELOC_FN( post_reloc_order, post_reloc_func ) \
  13. static struct post_reloc_fn post_reloc_functions \
  14. __attribute__ (( used, __section__( ".post_reloc_fns." \
  15. post_reloc_order ) )) = { \
  16. .post_reloc = post_reloc_func, \
  17. };
  18. #endif
  19. #endif /* RELOCATE_H */