This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
_ctype_ alias and versioned symbols
- From: Shaun Jackman <sjackman at gmail dot com>
- To: newlib at sources dot redhat dot com
- Date: Wed, 6 Apr 2005 15:47:36 -0700
- Subject: _ctype_ alias and versioned symbols
- References: <7f45d93905040511181cc6fb1c@mail.gmail.com>
- Reply-to: Shaun Jackman <sjackman at gmail dot com>
On Apr 5, 2005 11:18 AM, Shaun Jackman <sjackman@gmail.com> wrote:
> /usr/bin/ld: warning: type and size of dynamic symbol
> `_ctype_@@VERS_1.10' are not defined
I did a bit of digging and found that _ctype_ is a rather unusual
symbol. Its definition uses an alias to calculate an address form
another symbol:
extern _CONST char _ctype_[1 + 256] __attribute__ ((alias ("_ctype_b+127")));
I didn't even know you could do this, so I've learned an interesting
trick today! In any case, it does seem to be confusing the versioned
symbol linker. Could this result be accomplished some other way?
On the topic of versioned symbols though, what are they being used for
in newlib? Although the symbol_version macro is defined, I can't see
that it's used anywhere. Could life be made simpler by removing the
--version-script?
Cheers,
Shaun