linker plugin api limitation

Rafael Espíndola rafael.espindola@gmail.com
Mon Feb 22 19:16:00 GMT 2016


>
> So you want to add
>
> LDPT_GET_DEFINED_SYMBOLS
>
> to enum ld_plugin_tag, which returns a list of symbols defined
> in the IR file.  Am I correct?

No. The existing api works just fine for collecting the symbols defined.

What is needed is a way to let the plugin know that a file it provided
symbols for is not to be used in the link.

One way to do it is to add another return value to the function that
is passed via  LDPT_GET_SYMBOLS. Since it is a new return value and
there is already a _V2, what we need is a  LDPT_GET_SYMBOLS_V3 that
can return a new value.

Another way is to add a new LDPT_IS_HANDLE_USED which the plugin is
supposed to call first to check if file associated with a given handle
should be used or not.

Cheers,
Rafael



More information about the Binutils mailing list