This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Support .gnu.lto_.lto section in ELF files (PR 24768).
- From: Nick Clifton <nickc at redhat dot com>
- To: Martin Liška <mliska at suse dot cz>, binutils at sourceware dot org
- Cc: amodra at gmail dot com
- Date: Mon, 5 Aug 2019 11:41:00 +0100
- Subject: Re: [PATCH] Support .gnu.lto_.lto section in ELF files (PR 24768).
- References: <2ea791b1-6f58-70e5-a330-0b89c58050b9@suse.cz> <1ecf87fa-b4c7-75e1-4f9f-1a261913dc81@redhat.com> <0ab94022-157f-5067-b5e9-3602e2875498@suse.cz>
Hi Martin,
>> + if (current->lto_slim_object && report_plugin_err)
>> + {
>> + report_plugin_err = FALSE;
>> + _bfd_error_handler
>> + (_("%pB: plugin needed to handle lto object"),
>> + current);
>> + }
>>
>> This piece of code is duplicated in several places. It might be
>> worthwhile creating a new function for it,
> Sure, that will be a nice improvement. Can you please point me to a header/source file
> which is already shared among gold, bfd and binutils folders?
Ah - there isn't anything suitable really. But if you put the
new function in the BFD sources and only use it from ld and the
binutils tools themselves, then the prototype should go into the
bfd/bfd.h header file. GOLD does not use the bfd library, so it
would be unable to access the function. (Which makes sense since
it has its own error reporting mechanism).
Cheers
Nick