current glibc build problems on alpha

Jakub Bogusz qboosh@pld-linux.org
Mon Jun 7 20:27:00 GMT 2004


On Sat, Jun 05, 2004 at 12:19:11PM +0200, Jakub Bogusz wrote:
[...]
> But then build failed on:
> 
> make[3]: Leaving directory `/home/users/qboosh/PLD/BUILD/libc/elf'
> alpha-pld-linux-gcc    -nostdlib -nostartfiles -r -o /home/users/qboosh/PLD/BUILD/libc/builddir/elf/librtld.os '-Wl,-(' /home/users/qboosh/PLD/BUILD/libc/builddir/elf/dl-allobjs.os /home/users/qboosh/PLD/BUILD/libc/builddir/elf/rtld-libc.a -lgcc '-Wl,-)' \
>           -Wl,-Map,/home/users/qboosh/PLD/BUILD/libc/builddir/elf/librtld.os.map
> alpha-pld-linux-gcc    -nostdlib -nostartfiles -shared  \
>   -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs -Wl,--verbose 2>&1 |        \
>           LC_ALL=C \
>           sed -e '/^=========/,/^=========/!d;/^=========/d'    \
>               -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
>           > /home/users/qboosh/PLD/BUILD/libc/builddir/elf/ld.so.lds
> alpha-pld-linux-gcc    -nostdlib -nostartfiles -shared -o /home/users/qboosh/PLD/BUILD/libc/builddir/elf/ld.so                  \
>           -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,defs     \
>           /home/users/qboosh/PLD/BUILD/libc/builddir/elf/librtld.os -Wl,--version-script=/home/users/qboosh/PLD/BUILD/libc/builddir/ld.map              \
>           -Wl,-soname=ld-linux.so.2 -T /home/users/qboosh/PLD/BUILD/libc/builddir/elf/ld.so.lds
> /home/users/qboosh/PLD/BUILD/libc/builddir/elf/librtld.os(.text+0x18): In function `_dl_start_user':: relocation truncated to fit: GPREL16 _dl_skip_args
> collect2: ld returned 1 exit status
> make[2]: *** [/home/users/qboosh/PLD/BUILD/libc/builddir/elf/ld.so] Error 1
> make[2]: Leaving directory `/home/users/qboosh/PLD/BUILD/libc/elf'
> make[1]: *** [elf/subdir_lib] Error 2
> make[1]: Leaving directory `/home/users/qboosh/PLD/BUILD/libc'
> make: *** [all] B³¹d 2
> 
> How to fix this one?

Well, attached patch seems to fix this. Is this the correct solution?

(it seems that moving _dl_skip_args to relro section caused that it
requires relocation larger than 16-bit)


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Team
-------------- next part --------------
--- libc/sysdeps/alpha/dl-machine.h.orig	2004-03-20 23:24:17.000000000 +0100
+++ libc/sysdeps/alpha/dl-machine.h	2004-06-07 17:09:35.000000000 +0200
@@ -321,7 +321,8 @@
 	mov	$0, $9						\n\
 	/* See if we were run as a command with the executable	\n\
 	   file name as an extra leading argument.  */		\n\
-	ldl	$1, _dl_skip_args($gp)	!gprel			\n\
+	ldah	$1, _dl_skip_args($gp)	!gprelhigh		\n\
+	ldl	$1, _dl_skip_args($1)	!gprellow		\n\
 	bne	$1, $fixup_stack				\n\
 $fixup_stack_ret:						\n\
 	/* The special initializer gets called with the stack	\n\


More information about the Libc-alpha mailing list