This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Version script help needed
On Samstag, 3. August 2002 16:22, H. J. Lu wrote:
> On Sat, Aug 03, 2002 at 02:45:36PM +0200, Franz Sirl wrote:
> > Hi,
> >
> > I'm at a loss with the handling of version scripts. If you look at the
> > appended testcase, you'll see that it generates 2 small shared libs with
> > versioned symbols:
> >
> > [fsirl@enzo:~/test-versioning]$ readelf -a mylibgcc1.so|grep divdi3
> > 25: 0000068c 36 FUNC GLOBAL DEFAULT 9 divdi3@VEROLD
> > [fsirl@enzo:~/test-versioning]$ readelf -a mylibgcc2.so|grep divdi3
> > 27: 000006b0 36 FUNC GLOBAL DEFAULT 9 divdi3@@VERNEW
> >
> > But what I want is both versions in _one_ shared lib like that:
> > 25: 0000068c 36 FUNC GLOBAL DEFAULT 9 divdi3@VEROLD
> > 27: 000006b0 36 FUNC GLOBAL DEFAULT 9 divdi3@@VERNEW
> >
> > What am I doing wrong?
>
> Read the glibc source :-). Change divdi3-new.c to
>
> ---
>
> int divdi3_new (void)
> {
> return 0;
> }
>
> asm (".symver divdi3_new,divdi3@@VERNEW");
I feared that :-(. But I'm searching for a small self-contained solution for
GCC-3.2/powerpc-linux-gnu and stuffing things like that into libgcc2.c short
before the release is probably impossible. Handling the new version of the
symbol via the version script and the old via platform specific stuff would
have been a nice self-contained solution.
Somehow I hoped this being a version script handling bug or me doing things
wrong :-(.
No other idea?
Franz.