This is the mail archive of the binutils@sourceware.org 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.


> + ? ? ? ? // 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.

-cary


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