[PATCH] ld: Call plugin hooks only if they are available
Howard Chu
hyc@symas.com
Wed Dec 16 18:44:11 GMT 2020
Howard Chu wrote:
> H.J. Lu wrote:
>> On Wed, Dec 16, 2020 at 3:16 AM Nick Clifton via Binutils
>> <binutils@sourceware.org> wrote:
>>>
>>> Hi Howard,
>>>
>>>>> Why not just make the new plugin disable itself if the host tool
>>>>> doesn't provide the all_symbols_read entry point?
>>>>
>>>> Yeah, that'd be fine too. Just noop/silently exit if entry points are missing.
>>>> I can write that up if folks agree it's better.
>>>
>>> Please do.
>>>
>>> It turns out that my proposed fix breaks the LTO plugin, so it is a no-go. :-(
>>>
>>
>> I am going to check this in if there are no objections today.
> The plugin shouldn't register any hooks at all, if any of these aren't available.
> There's no point in doing the register_claim_file, that will just be wasted work.
>
Something like this instead.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-No-op-if-not-all-required-plugin-hooks-are-available.patch
Type: text/x-patch
Size: 1492 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20201216/78979ab5/attachment-0001.bin>
More information about the Binutils
mailing list