This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bogosity of merging GLOB_DATs with JUMP_SLOTs (was: Re:[PATCH] Fix PLT infinite loop for cris-*-*.)


Am Die, 2003-10-07 um 21.37 schrieb Hans-Peter Nilsson:
> Because *_GLOB_DATs and *_JUMP_SLOTs (a.k.a. .got and .plt.got)
> relocs don't always have the same contents after relocation, the
> optimization in the CRIS linker backend to merge them is bogus.
> A test-case follows, showing that with the kind of change in the
> glibc patch at
> <URL:http://sources.redhat.com/ml/libc-alpha/2003-09/msg00149.html>,
> the R_CRIS_GLOB_DAT for "y" in libb.so is incorrectly
> initialized to the real function address, where it should have
> been the stub in the main function.
> 
> Uwe, can you please confirm that you see the bug exposed by this
> test-case with your glibc with the patch mentioned above?  I've
> only run this test on an older glibc version, but will get the
> cris-axis-linux-gnu glibc port up and running before checking in
> the GNU ld (or rather, BFD) correction.  I'll post it before
> that, though.

Hi,

here's the output for the test:

devboard hp # make
gcc -mlinux -O2 -fpic -shared -o libb.so b.c
gcc -mlinux -O2 -o main main.c libb.so
devboard hp # ./main
b: 1aac05d0 y: 803f8
devboard hp # file /lib/libc.so.6
/lib/libc.so.6: symbolic link to `libc-2.3.1.so'
devboard hp # ld -v
GNU ld version 2.13.90.0.18 20030121
devboard hp # gcc -v
Reading specs from /usr/lib/gcc-lib/cris-axis-linux-gnu/3.2.2/specs
Configured with: /var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/configure
--prefix=/usr --bindir=/usr/cris-axis-linux-gnu/gcc-bin/3.2
--includedir=/usr/lib/gcc-lib/cris-axis-linux-gnu/3.2.2/include
--datadir=/usr/share/gcc-data/cris-axis-linux-gnu/3.2
--mandir=/usr/share/gcc-data/cris-axis-linux-gnu/3.2/man
--infodir=/usr/share/gcc-data/cris-axis-linux-gnu/3.2/info
--enable-shared --host=cris-axis-linux-gnu --target=cris-axis-linux-gnu
--with-system-zlib --enable-languages=c,c++,ada,f77,objc
--enable-threads=posix --enable-long-long --disable-checking
--enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/cris-axis-linux-gnu/3.2.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --disable-nls
Thread model: posix
gcc version 3.2.2
devboard hp #

My glibc is patched with "non beautified" version of the patch.

Best regards, Uwe



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]