How to preserve section group for ld -r?

H. J. Lu hjl@lucon.org
Thu Apr 29 16:19:00 GMT 2004


The current linker doesn't preserve section group for ld -r since
the group section isn't mentioned in the linker script. But I am
having difficulty adding the group section to the linker script. The
plan is

1. All group sections should have name of ".group.signature" since
the linker script doesn't know SHT_GROUP.
2. They will be marked with SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD.
3. Modify the linker scripte to preserve ".group.*" sections for ld -r.

How do I express #3 in a linker script?



H.J.



More information about the Binutils mailing list