[patch/rfc][pr17902] GC unused parts of mergeable sections

Rafael Espíndola rafael.espindola@gmail.com
Fri Feb 6 16:28:00 GMT 2015


A new version is attached with just some cleanup on the logic on
whether to keep a local symbol or not.

While working on it I noticed how remarkably similar the code is to
the existing merge map. I now think the merge map can be reused for
this. The plan is:

* During the gc walk, add offset -> -1 mappings. This is similar to
what we do when  CIE is dropped.
* In Output_merge_data::do_add_input_section, and
Output_merge_string<Char_type>::do_add_input_section (if gc is enable)
only add entries if a mapping is present.
* Output local symbols only if a mapping is present.

Sounds reasonable or can you thing of a reason why we would need an
independent map?

Cheers,
Rafael


On 5 February 2015 at 10:26, Rafael Espíndola
<rafael.espindola@gmail.com> wrote:
> A new wip version is attached.
>
> In comparison with the previous one, this version
>
> * Handles non-string SHF_MERGE.
> * Handles symbol making part of a section referenced.
> * Mix fixes.
>
> It reduces the .rodata section in chrome from 6985174 to 6851542 bytes.
>
> Cheers,
> Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 15477 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150206/813cabb4/attachment.bin>


More information about the Binutils mailing list