This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gold patch to discard .note.callgraph sections in the final link.

Cary Coutant <> writes:

>> + Â Â Â Â // This section is special. ÂIt records the callgraph edge profile
>> + Â Â Â Â // information. ÂIt should be omitted after its contents are read.
>> + Â Â Â Â if (is_prefix_of(".note.callgraph.text", name))
>> + Â Â Â Â Â {
>> + Â Â Â Â Â Â if (!relocatable)
>> + Â Â Â Â Â Â Â omit[i] = true;
>> + Â Â Â Â Â }
> The comment should mention that the contents of this section are read
> by a plugin, rather than by the linker itself.
> Like Ian, I don't like special-casing the name. I thought of
> suggesting that the plugin should arrange to discard the section, but
> we'd want to discard it even (especially!) when the plugin isn't being
> used. That suggests use of the SHF_EXCLUDE flag, but we want ld -r to
> pass the section through for processing during the final link. That
> brings up the issue of whether SHF_EXCLUDE sections should be
> discarded during an ld -r link, or whether we'd want yet another flag
> for that. This special case seems easiest for now.

As I understand it, SHF_EXCLUDE sections should not be discarded by an
ld -r link.  If gold is doing that today, which it probably is, that
should be fixed.  So, yeah, SHF_EXCLUDE sounds like a much better way to
deal with this.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]