When building binaries in glibc as PIE, the linker fails on multiple architectures when handling relative relocations. This one is for ia64: ia64-glibc-linux-gnu-gcc -o build-many-3/build/glibcs/ia64-linux-gnu/glibc/support/test-run-command -nostdlib -nostartfiles -static build-many-3/build/glibcs/ia64-linux-gnu/glibc/csu/crt1.o build-many-3/build/glibcs/ia64-linux-gnu/glibc/csu/crti.o `ia64-glibc-linux-gnu-gcc --print-file-name=crtbegin.o` build-many-3/build/glibcs/ia64-linux-gnu/glibc/support/test-run-command.o build-many-3/build/glibcs/ia64-linux-gnu/glibc/elf/static-stubs.o build-many-3/build/glibcs/ia64-linux-gnu/glibc/support/libsupport_nonshared.a -Wl,--start-group build-many-3/build/glibcs/ia64-linux-gnu/glibc/libc.a -lgcc -Wl,--end-group `ia64-glibc-linux-gnu-gcc --print-file-name=crtend.o` build-many-3/build/glibcs/ia64-linux-gnu/glibc/csu/crtn.o build-many-3/build/glibcs/ia64-linux-gnu/glibc/libc.a(dl-support.o): in function `_dl_aux_init': build-many-3/src/glibc/elf/dl-support.c:254:(.text+0x42): relocation truncated to fit: GPREL22 against `.text' build-many-3/build/glibcs/ia64-linux-gnu/glibc/libc.a(dl-support.o): in function `setup_vdso': build-many-3/src/glibc/elf/setup-vdso.h:108:(.text+0x1092): relocation truncated to fit: GPREL22 against `.text' collect2: error: ld returned 1 exit status make[3]: *** [../Rules:269: build-many-3/build/glibcs/ia64-linux-gnu/glibc/support/test-run-command] Error 1 I'll post a more reduced reproducer soon, this is from build-many-glibcs.py; I need the bug number as a reference to record in glibc as I enable PIE by default there. Affected targets: hppa-linux-gnu ia64-linux-gnu csky-linux-gnuabiv2 alpha-linux-gnu
Since you are building -static the executable may be pulling in most of libc.a and thus be quite large. A relocation overflow is very likely the correct result from the linker. You might need to explore gcc options for compiling in larger code models.
Closing, assuming comment #1 was true given there was no reply.