[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "make tests" fails with "libc.so: text relocations used" in glibc-2.
Re: "make tests" fails with "libc.so: text relocations used" in glibc-2.3.2 for sh4
Tue, 29 Jul 2003 08:53:39 +0900
Dan Kegel <address@hidden> wrote:
> I'm cross-building glibc for sh4 using gcc-3.3 and binutils-126.96.36.199.18.
> My scripts are online at http://kegel.com/crosstool
> and are partly working with glibc-2.2.5 on sh4, with a few glibc
> test execution failures (see
> Now I'm trying glibc-2.3.2, but "make tests" fails at build time with error
> make: *** [/gcc-3.3-glibc-2.3.2/build-glibc/elf/check-textrel.out] Error 1
> Looking inside check-textrel.out, I see the errors
> /gcc-3.3-glibc-2.3.2/build-glibc/libc.so: text relocations used
> FWIW, a similar problem was reported on ppc:
> and fixed by a patch to glibc:
> Do we need a similar fix for sh4? Or am I perhaps using the wrong version of
No and no, unfortunately.
If you looked the output of readelf -a libc.so closely, you could
find that the only text relocation occurs for __fpscr_values in
__udivsi3_i4 which is a libgcc function. So a fix would be to
write a PIC version of __udivsi3_i4. But it seems a trade-off
between slight inefficiency of the integral division and one text