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: [RFC PATCH 1/4] [BFD][LD] Fix linker error when using NT weak externals


On Fri, Oct 23, 2015 at 9:39 AM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Oct 22, 2015 at 07:10:17PM +0300, Octavian Purdila wrote:
>> *In PE COFF case defined weak symbols are implemented as weak
>> externals which requires them to be seen as undefined (weak) symbols.
>
> Which is what you will need to fix, somehow.  You cannot change the
> generic linker behaviour to suit some target weirdness.
>

Hi Alan,

Thanks for the review. This is my first dive into binutils so please
pardon the obvious mistakes.

To clarify the point you where making earlier, why is strong undefined
preferred over weak undefined? Could you give me an example how
changes this will affect the linker? To me they are quite similar.

To me, the cleanest solution to handler NT weak externals is to use a
different BSF_ flag, link_row, link_action, different link hash type,
etc. This way we can easily differentiate between NT weak externals
and regular weak symbols and avoid changing existing linker behavior.
Would that be acceptable?

Thanks,
Tavi


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