[patch/rfc][pr17902] GC unused parts of mergeable sections
Rafael Espíndola
rafael.espindola@gmail.com
Tue Feb 3 16:11:00 GMT 2015
Attached is an incomplete patch for removing unused parts of mergeable sections.
It uses the walk over relocations done by --gc-sections to collect
which offsets in a mergeable section are used. It then stores that
information in a (section -> offset set) map in Relobj.
The map is then used by other parts of the linker to avoid including
them in the output. In the patch, only strings is implemented.
The obvious missing parts are marked with a FIXME (and it is missing a
test). For now it would be nice to just know if I am going on the
right direction or if there is a better place to plug in this
optimization.
I tested it when linking chrome and it cuts the rodata section from
6985174 to 6852054 bytes.
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 6575 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150203/322ba953/attachment.bin>
More information about the Binutils
mailing list