Descriptionld: fix ELF strip by removing overlap of sections
The gosymtab and gopclntab sections were pointing to the proper
data, but that data was already owned by the rodata section.
Some ELF references explicitly prohibit multiple sections from
owning the same data, and strip behaves accordingly.
The data for these sections was moved to after rodata, and the
gosymtab and gopclntab sections now own their respective ranges.
This change makes strip happy both with and without -s being
provided at link time. Note that it won't remove these sections
because they are still allocated, and that's by design since
they are necessary at runtime for generating proper backtraces
and similar introspection operations.
Unlike the previous behavior, -s will now maintain zero-sized
gosymtab and gopclntab sections. This makes the implementation
slightly cleaner.
Fixes issue 1242.
NOTE: Tested on Linux amd64/386/arm only.
Patch Set 1 #Patch Set 2 : code review 4639077: ld: fix strip by removing overlap of sections #Patch Set 3 : diff -r d4c5ffc402ba https://go.googlecode.com/hg/ #Patch Set 4 : diff -r d4c5ffc402ba https://go.googlecode.com/hg/ #Patch Set 5 : diff -r dde611a6760e https://go.googlecode.com/hg/ #
MessagesTotal messages: 8
|