This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] PR ld/19636: [x86] Resolve undefweak and defined symbols in executable
- From: Alan Modra <amodra at gmail dot com>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Thu, 3 Mar 2016 13:24:10 +1030
- Subject: Re: [PATCH] PR ld/19636: [x86] Resolve undefweak and defined symbols in executable
- Authentication-results: sourceware.org; auth=none
- References: <CAJimCsG=1u_yM6SBFAxCxB4JvWtxO5fZ22+OmG6UC_RYON3DdA at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1602251356320 dot 20277 at wotan dot suse dot de> <CAMe9rOpzw08UPTfjFEhixY=x4je--03ZdsXdrpdS-2sYSxDE3Q at mail dot gmail dot com> <56D5A0D9 dot 5070500 at foss dot arm dot com> <CAMe9rOq_sXd9qccTddvMB8sTBgOPWq0wgiqSQX4iSyUVys4n-Q at mail dot gmail dot com> <56D6D676 dot 5020202 at foss dot arm dot com> <CAMe9rOq__U54POpvUgKrYTinD1J0josM6MWph3d+zGmm=v3rgQ at mail dot gmail dot com> <56D6DC51 dot 8040503 at foss dot arm dot com> <CAMe9rOq_LZTeC+Zkd6L-o=8Sd=hbvmTDJ+LOCMXfqVAuyU+5CQ at mail dot gmail dot com> <56D6E982 dot 1090607 at foss dot arm dot com>
On Wed, Mar 02, 2016 at 01:24:18PM +0000, Jiong Wang wrote:
> While reading from http://www.skyfree.org/linux/references/ELF_Format.pdf,
"This document is intended for developers who are creating object or
executable files on various 32-bit environment operating systems."
According to the document overview you shouldn't even be using it for
64-bit architectures! ;-)
> "The link editor does not extract archive members to resolve undefined
> weak symbols. Unresolved weak symbols have a zero value."
> Looks to me the spec is even more strict that weak symbol's life is defined
> to be ended
> after static linking stage. All unresolved weak symbols are assigned zero
The section you quote is specifically about static linking. You
shouldn't presume too much from the above regarding dynamic linking
Australia Development Lab, IBM