This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Versioning mess proved!!!
- To: Christian Iseli <chris at ludwig-alpha dot unil dot ch>
- Subject: Re: Versioning mess proved!!!
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Tue, 3 Oct 2000 21:19:15 +0200
- Cc: Geoff Keating <geoffk at cygnus dot com>,drepper at cygnus dot com,philb at gnu dot org,howarth at fuse dot net,libc-alpha at sourceware dot cygnus dot com,aj at suse dot de
- References: <200010031604.SAA28178@ludwig-alpha.unil.ch>
On Tue, 03 Oct 2000, Christian Iseli wrote:
> Hi,
>
> Franz.Sirl-kernel@lauterbach.com said:
> > $ LD_LIBRARY_PATH=./213/ LD_BIND_NOW=1 ./tA
> > 0x10010818
> > $ LD_LIBRARY_PATH=./22/ LD_BIND_NOW=1 ./tA
> > 0x10010818
> > Segmentation fault (core dumped)
> >
> > The testcase works on both glibc-2.1.9x and gcc-2.1.3 systems and
> > illustrates the same fault I see with zlib, namely that during the
> > execution the first word of foo() gets relocated to an absolute
> > branch to 0. This leads to a nice segfault then.
>
> Tried it on alpha, both under glibc-2.1.2 and mainline glibc-2.1.94:
> # LD_LIBRARY_PATH=./213/ LD_BIND_NOW=1 ./tA
> 0x20000122a90
> # LD_LIBRARY_PATH=./22/ LD_BIND_NOW=1 ./tA
> (nil)
If you change the last compile command to:
gcc tA-22.c -fpic -Wl,-v -L213 -ltB -o tA
(added -fpic), what does objdump/readelf tell you? I get:
[fsirl@enzo:~]$ objdump -xTR tA|grep foo
10010920 w F *UND* 0000001c foo
10010920 w DF *UND* 0000001c foo
100107fc R_PPC_GLOB_DAT foo
10010920 R_PPC_JMP_SLOT foo
[fsirl@enzo:~]$ readelf -a tA|grep foo
100107fc 00b14 R_PPC_GLOB_DAT 10010920 foo +
0
10010920 00b15 R_PPC_JMP_SLOT 10010920 foo +
0
11: 10010920 28 FUNC WEAK DEFAULT UND foo
96: 10010920 28 FUNC WEAK DEFAULT UND foo
Franz.