This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC PATCH 1/4] [BFD][LD] Fix linker error when using NT weak externals
- From: Octavian Purdila <octavian dot purdila at intel dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 23 Oct 2015 10:08:37 +0300
- Subject: Re: [RFC PATCH 1/4] [BFD][LD] Fix linker error when using NT weak externals
- Authentication-results: sourceware.org; auth=none
- References: <1445530220-4412-1-git-send-email-octavian dot purdila at intel dot com> <1445530220-4412-2-git-send-email-octavian dot purdila at intel dot com> <20151023063913 dot GV13961 at bubble dot grove dot modra dot org>
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