This is the mail archive of the 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

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

I think I'd prefer to have get_input_file() return a new status code
(or maybe LDPS_NO_SYMS). But I don't think that interface is used in
the LTO plugin, and I can see not wanting to call get_input_file() and
release_input_file() in cases where the plugin didn't have to call it

So I'd be OK with adding either a new status return for get_symbols()
or a new symbol resolution value to replace LDPR_PREEMPTED_REG for
this case. Either one will warrant a "V3".

I guess I'd lean towards having get_symbols() just return LDPS_NO_SYMS
for this case.


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