2021-06-01 01:04 AM
Can you explain what is the use of these section in .ld file
KEEP (*(.init)) in text section
KEEP (*(.fini)) in text section
*(.eh_frame) in text section
*(COMMON) in bss section
and whats the difference b/w
*(.rodata) and *(.rodata*)
Thanks
D.Manikandan
2021-06-01 03:21 AM
https://sourceware.org/binutils/docs/ld/Input-Section-Keep.html
... and read the whole manual there.
.eh_frame and COMMON are just some input section names presumably used by the compiler to locate certain code/data to where it belongs.
*(.rodata*) is an input section including any section starting with .rodata and whatever after it, eg. .rodata1234 or .rodata_foo; *(.rodata) is an input section (from any file, that's what the first asterisk indicates) which is called exactly .rodata
JW
2021-06-16 11:22 PM
Thanks for your reply @waclawek.jan