This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: New flag --keep-section <section_name> to prevent certain sections from being linker garbage collected.
- From: Cary Coutant <ccoutant at google dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, Paul Pluzhnikov <ppluzhnikov at google dot com>, binutils <binutils at sourceware dot org>
- Date: Sat, 19 Jul 2014 02:55:32 -0700
- Subject: Re: New flag --keep-section <section_name> to prevent certain sections from being linker garbage collected.
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8HmwewDcEdmY31qK4iraZbzwgJmngVm3TF55cZnS-c1DuKw at mail dot gmail dot com> <mcrlilrcryr dot fsf at dhcp-172-18-216-180 dot mtv dot corp dot google dot com> <CAAs8HmzonMecg4ikodqfmJq69zvj2BmjmcKpZSoGNea8ONRZyA at mail dot gmail dot com> <mcrhawfcn0u dot fsf at dhcp-172-18-216-180 dot mtv dot corp dot google dot com> <CAAs8HmwWV5VeV9edcJHy6L-wFW1sd_9eKNo1FXU9kCdqoHd+0g at mail dot gmail dot com>
> I am resurfacing this discussion as this was not resolved last time
> around although Ian did approve including ".rodata.nptl_version"
> always. So, I have included a patch to keep ".rodata.nptl_version"
> always in is_section_name_included. The other ways to avoid baking
> pthread knowledge into the linker is to add a --keep-section option or
> to use a linker script which is not the gold way.
>
> Please review.
+ /* Do not garbage collect .rodata.nptl_version from libpthread). */
The parenthesis is unbalanced, but I don't think this comment is
necessary -- none of the other clauses in that if statement have
comments. I think it's sufficient to provide the justification in the
ChangeLog and commit message.
This is OK with that change.
Thanks!
-cary