2
0

sections.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. #ifndef SECTIONS_H
  2. #define SECTIONS_H
  3. #include "compiler.h"
  4. #define __text_hot ___section(".text.hot","ax")
  5. #define __rodata_hot ___section(".rodata.hot","a")
  6. #define __data_hot ___section(".data.hot","aw")
  7. #define __rwtext ___section(".rwtext","awx")
  8. #define __sdata ___section(".sdata","aw")
  9. #define __string_hot ___section(".rodata.hot.str","aMS")
  10. #define __sbss ___section(".sbss.hot","aw",@nobits)
  11. #define __bss_hot ___section(".bss.hot","aw",@nobits)
  12. #define __esplink_head ___section(".dram.esplink.head","aw",@nobits)
  13. #define __esplink ___section(".dram.bss.esplink","aw",@nobits)
  14. #define __dram_rom ___section(".dram.abcrom","a")
  15. #define __dram_text ___section(".dram.text","ax")
  16. #define __dram_rodata ___section(".dram.rodata","a")
  17. #define __dram_string ___section(".dram.rodata.str","aMS")
  18. #define __dram_data ___section(".dram.data","aw")
  19. #define __dram_bss ___section(".dram.bss","aw",@nobits)
  20. #define __dram_noinit ___section(".dram.noinit","aw",@nobits)
  21. #ifndef __ASSEMBLY__
  22. #define hotstr(x) ({ static __string_hot const char _str[] = (x); _str; })
  23. #endif /* __ASSEMBLY__ */
  24. #endif /* SECTIONS_H */