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: linker plugin api limitation


>
> 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


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