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

An updated patch with changelog is attached.


On 3 March 2016 at 14:19, Cary Coutant <> wrote:
>> The bug is in gold. It is handling every symbol provided by the plugin
>> as defined when handling --start-lib/--end-lib members.
>> Something like the attached patch should fix it.
> +      if (sym.def != LDPK_DEF && sym.def != LDPK_WEAKDEF &&
> +          sym.def != LDPK_COMMON)
> +        continue;
> When breaking expressions, the operator should be placed at the
> beginning of the next line. Also, it would read better to have each
> condition on its own line if the line must be broken.
> I have a slight preference for inverting the condition:
>       if (sym.def == LDPK_UNDEF || sym.def == LDPK_WEAKUNDEF)
>         continue;
> There are fewer conditions to check, and if we ever add another LDPK_
> value, I think it's more likely that it'd be a kind of DEF than a kind
> of UNDEF. It also more closely mirrors the code in
> Sized_relobj_file::do_should_include_member().
> This is OK with that change. Thanks!
> -cary

Attachment: t.diff
Description: Text document

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