下面是一个ld文件的内容,以下6个地方不明白代表什么意思,求解答!
1、KEEP (*(.ctors)) ctors代表什么意思?
2、KEEP (*(.dtors)) dtors代表什么意思?
3、KEEP (*(.init_array*)) init_array代表什么意思?
4、*(.init),*(.fini*)代表什么意思?
5、*(.ARM.exidx* .gnu.linkonce.armexidx.*)什么意思?
6、*(.ARM.extab* .gnu.linkonce.armextab.*)什么意思?
- MEMORY
- {
- FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x00040000
- SRAM (WX) : ORIGIN = 0x20000000, LENGTH = 0x00008000
- }
-
- REGION_ALIAS("REGION_TEXT", FLASH);
- REGION_ALIAS("REGION_BSS", SRAM);
- REGION_ALIAS("REGION_DATA", SRAM);
- REGION_ALIAS("REGION_STACK", SRAM);
- REGION_ALIAS("REGION_HEAP", SRAM);
- REGION_ALIAS("REGION_ARM_EXIDX", FLASH);
- REGION_ALIAS("REGION_ARM_EXTAB", FLASH);
-
- SECTIONS {
-
- PROVIDE (_intvecs_base_address =
- DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x0);
-
- .intvecs (_intvecs_base_address) : AT (_intvecs_base_address) {
- KEEP (*(.intvecs))
- } > REGION_TEXT
-
- PROVIDE (_vtable_base_address =
- DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20000000);
-
- .vtable (_vtable_base_address) (NOLOAD) : {
- KEEP (*(.vtable))
- } > REGION_DATA
-
- .text : {
- CREATE_OBJECT_SYMBOLS
- *(.text)
- *(.text.*)
- . = ALIGN(0x4);
- KEEP (*(.ctors))
- . = ALIGN(0x4);
- KEEP (*(.dtors))
- . = ALIGN(0x4);
- __init_array_start = .;
- KEEP (*(.init_array*))
- __init_array_end = .;
- *(.init)
- *(.fini*)
- } > REGION_TEXT AT> REGION_TEXT
-
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
-
- .rodata : {
- *(.rodata)
- *(.rodata*)
- } > REGION_TEXT AT> REGION_TEXT
-
- .data : ALIGN (4) {
- __data_load__ = LOADADDR (.data);
- __data_start__ = .;
- *(.data)
- *(.data*)
- . = ALIGN (4);
- __data_end__ = .;
- } > REGION_DATA AT> REGION_TEXT
-
- .ARM.exidx : {
- __exidx_start = .;
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- __exidx_end = .;
- } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX
-
- .ARM.extab : {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB
-
- .bss : {
- __bss_start__ = .;
- *(.shbss)
- *(.bss)
- *(.bss.*)
- *(COMMON)
- . = ALIGN (4);
- __bss_end__ = .;
- } > REGION_BSS AT> REGION_BSS
-
- .heap : {
- __heap_start__ = .;
- end = __heap_start__;
- _end = end;
- __end = end;
- KEEP(*(.heap))
- __heap_end__ = .;
- __HeapLimit = __heap_end__;
- } > REGION_HEAP AT> REGION_HEAP
-
- .stack (NOLOAD) : ALIGN(0x8) {
- _stack = .;
- __stack = .;
- KEEP(*(.stack))
- } > REGION_STACK AT> REGION_STACK
- }
复制代码
|
https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_chapter/ld_3.html
谢谢,看过类似的,但都解释不全
希望能多解析一下link