This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: --no-undefined-version
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 5 Jan 2010 20:29:25 -0800
- Subject: Re: --no-undefined-version
- References: <mcry6kc2ge6.fsf@dhcp-172-17-9-151.mtv.corp.google.com>
On Tue, Jan 5, 2010 at 5:04 PM, Ian Lance Taylor <iant@google.com> wrote:
> The GNU ld option --no-undefined-version is defined as follows:
>
> ? ?Normally when a symbol has an undefined version, the linker will
> ? ?ignore it. ?This option disallows symbols with undefined version
> ? ?and a fatal error will be issued instead.
>
> As far as I can tell, what the option actually does is this:
>
> For each version defined in a version script:
> ?for each global symbol pattern in that version listed in the script:
> ? ?if the pattern is a literal string--not a wildcard pattern:
> ? ? ?if the pattern does not match any symbol defined in the link:
> ? ? ? ?give an error.
>
> In other words, the option does not check for symbols with undefined
> versions. ?It checks for cases where a version script explicitly lists
> a symbol, but the symbol is not defined.
>
That is what I meant by "a symbol has an undefined version".
A version script declares a symbol with multiple versions. This
option checks if any version of such a symbol is undefined.
--
H.J.