- 论坛徽章:
- 0
|
说错请纠正
1. _stext = .; _stext从当前地址开始
2. *(.text.head),我的代码是*(.head.text),在include/linux/init.h中有很多section的宏
/* For assembly routines */
#define __HEAD .section ".head.text","ax"
这个段是定义汇编部分的在 arch/arm/kernel/head.S
__HEAD
ENTRY(stext)
3. *(.arch.info.init) 在arch/arm/include/asm/mach/arch.h
MACHINE_START每款CPU都有定义一个
- /*
- * Set of macros to define architecture features. This is built into
- * a table by the linker.
- */
- #define MACHINE_START(_type,_name) \
- static const struct machine_desc __mach_desc_##_type \
- __used \
- __attribute__((__section__(".arch.info.init"))) = { \
- .nr = MACH_TYPE_##_type, \
- .name = _name,
- #define MACHINE_END \
- };
复制代码 |
|