What does KEEP mean in a linker script?
问题 The LD manual does not explain what the KEEP command does. Below is a snippet from a third-party linker script that features KEEP . What does the KEEP command do in ld ? SECTIONS { .text : { . = ALIGN(4); _text = .; PROVIDE(stext = .); KEEP(*(.isr_vector)) KEEP(*(.init)) *(.text .text.*) *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) *(.gcc_except_table) *(.gnu.linkonce.r.*) . = ALIGN(4); _etext = .; _sidata = _etext; PROVIDE(etext = .); _fini = . ; *(.fini) } >flash 回答1: