2
0

sections.h 1.0 KB

1234567891011121314151617181920212223242526272829
  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_text ___section(".dram.text","ax")
  15. #define __dram_rodata ___section(".dram.rodata","a")
  16. #define __dram_string ___section(".dram.rodata.str","aMS")
  17. #define __dram_data ___section(".dram.data","aw")
  18. #define __dram_bss ___section(".dram.bss","aw",@nobits)
  19. #define __dram_noinit ___section(".dram.noinit","aw",@nobits)
  20. #ifndef __ASSEMBLY__
  21. #define hotstr(x) ({ static __string_hot const char _str[] = (x); _str; })
  22. #endif /* __ASSEMBLY__ */
  23. #endif /* SECTIONS_H */