This is the mail archive of the 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
> 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:>,
> the R_CRIS_GLOB_DAT for "y" in 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.


here's the output for the test:

devboard hp # make
gcc -mlinux -O2 -fpic -shared -o b.c
gcc -mlinux -O2 -o main main.c
devboard hp # ./main
b: 1aac05d0 y: 803f8
devboard hp # file /lib/
/lib/ symbolic link to `'
devboard hp # ld -v
GNU ld version 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
--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
--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]