* failure to link kernel 3.0.3 with cross binutils-2.21.1/gcc-4.6.1
@ 2011-09-13 7:20 Graham Gower
2011-09-13 7:48 ` Rolf Eike Beer
2011-09-13 13:55 ` John David Anglin
0 siblings, 2 replies; 5+ messages in thread
From: Graham Gower @ 2011-09-13 7:20 UTC (permalink / raw)
To: linux-parisc
Toolchain build like so:
grg@eye7:~$ cat bin/hppa64-cross.sh
#!/bin/sh
PREFIX=/tmp/hppa65
TARGET=hppa64-linux
HOST=x86_64-slackware-linux
BINUTILS=binutils-2.21.1
GCC=gcc-4.6.1
TMPDIR=/tmp
MAKEOPTS="-j 8"
PATH=$PREFIX/bin:$PATH
die() {
echo "||||||"
echo "ERROR: $@"
exit 1
}
### Binutils
do_binutils() {
cd $TMPDIR
tar xf $BINUTILS.tar.bz2
mkdir build-$BINUTILS
cd build-$BINUTILS
../$BINUTILS/configure \
--target=$TARGET \
--prefix=$PREFIX \
|| return 1
make $MAKEOPTS || return 1
make $MAKEOPTS install || return 1
}
### GCC, initial gcc without threading or shared library support
do_gcc1() {
cd $TMPDIR
tar xf $GCC.tar.bz2
mkdir build-$GCC-1
cd build-$GCC-1
export AR=ar
../$GCC/configure \
--target=$TARGET \
--host=$HOST \
--build=$HOST \
--prefix=$PREFIX \
--with-newlib \
--disable-shared \
--disable-threads \
--disable-multilib \
--disable-libmudflap \
--disable-libssp \
--disable-libgomp \
--disable-libquadmath \
--enable-languages=c \
$GCC1_EXTRA_CONF \
|| return 1
make $MAKEOPTS || return 1
make $MAKEOPTS install || return 1
}
do_clean() {
cd $TMPDIR
rm -fr build-$BINUTILS build-$GCC-1
rm -fr $BINUTILS $GCC $GLIBC $LINUX
}
do_clean
do_binutils || die "do_binutils failed"
do_gcc1 || die "do_gcc1 failed"
grg@eye7:/mnt/1T/hppa/linux-3.0$ make vmlinux ARCH=parisc
CROSS_COMPILE=/tmp/hppa64/bin/hppa64-linux-
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
/tmp/hppa64/bin/hppa64-linux-ld:
arch/parisc/mm/built-in.o(.init.text+0xed0): cannot reach
flush_tlb_all_local
/tmp/hppa64/bin/hppa64-linux-ld: BFD (GNU Binutils) 2.21.1 internal
error, aborting at ../../binutils-2.21.1/bfd/elf64-hppa.c line 3956 in
elf64_hppa_relocate_section
/tmp/hppa64/bin/hppa64-linux-ld: Please report this bug.
make: *** [.tmp_vmlinux2] Error 1
Any clues?
-Graham
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: failure to link kernel 3.0.3 with cross binutils-2.21.1/gcc-4.6.1
2011-09-13 7:20 failure to link kernel 3.0.3 with cross binutils-2.21.1/gcc-4.6.1 Graham Gower
@ 2011-09-13 7:48 ` Rolf Eike Beer
2011-09-13 14:03 ` John David Anglin
2011-09-13 13:55 ` John David Anglin
1 sibling, 1 reply; 5+ messages in thread
From: Rolf Eike Beer @ 2011-09-13 7:48 UTC (permalink / raw)
To: Graham Gower; +Cc: linux-parisc
> grg@eye7:/mnt/1T/hppa/linux-3.0$ make vmlinux ARCH=parisc
> CROSS_COMPILE=/tmp/hppa64/bin/hppa64-linux-
> CHK include/linux/version.h
> CHK include/generated/utsrelease.h
> CALL scripts/checksyscalls.sh
> CHK include/generated/compile.h
> LD vmlinux.o
> MODPOST vmlinux.o
> GEN .version
> CHK include/generated/compile.h
> UPD include/generated/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
> KSYM .tmp_kallsyms1.S
> AS .tmp_kallsyms1.o
> LD .tmp_vmlinux2
> /tmp/hppa64/bin/hppa64-linux-ld:
> arch/parisc/mm/built-in.o(.init.text+0xed0): cannot reach
> flush_tlb_all_local
> /tmp/hppa64/bin/hppa64-linux-ld: BFD (GNU Binutils) 2.21.1 internal
> error, aborting at ../../binutils-2.21.1/bfd/elf64-hppa.c line 3956 in
> elf64_hppa_relocate_section
>
> /tmp/hppa64/bin/hppa64-linux-ld: Please report this bug.
>
> make: *** [.tmp_vmlinux2] Error 1
>
> Any clues?
Maybe related to this:
http://sourceware.org/bugzilla/show_bug.cgi?id=13168
Eike
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: failure to link kernel 3.0.3 with cross binutils-2.21.1/gcc-4.6.1
2011-09-13 7:48 ` Rolf Eike Beer
@ 2011-09-13 14:03 ` John David Anglin
0 siblings, 0 replies; 5+ messages in thread
From: John David Anglin @ 2011-09-13 14:03 UTC (permalink / raw)
To: Rolf Eike Beer; +Cc: Graham Gower, linux-parisc
On 9/13/2011 3:48 AM, Rolf Eike Beer wrote:
>> grg@eye7:/mnt/1T/hppa/linux-3.0$ make vmlinux ARCH=parisc
>> CROSS_COMPILE=/tmp/hppa64/bin/hppa64-linux-
>> CHK include/linux/version.h
>> CHK include/generated/utsrelease.h
>> CALL scripts/checksyscalls.sh
>> CHK include/generated/compile.h
>> LD vmlinux.o
>> MODPOST vmlinux.o
>> GEN .version
>> CHK include/generated/compile.h
>> UPD include/generated/compile.h
>> CC init/version.o
>> LD init/built-in.o
>> LD .tmp_vmlinux1
>> KSYM .tmp_kallsyms1.S
>> AS .tmp_kallsyms1.o
>> LD .tmp_vmlinux2
>> /tmp/hppa64/bin/hppa64-linux-ld:
>> arch/parisc/mm/built-in.o(.init.text+0xed0): cannot reach
>> flush_tlb_all_local
>> /tmp/hppa64/bin/hppa64-linux-ld: BFD (GNU Binutils) 2.21.1 internal
>> error, aborting at ../../binutils-2.21.1/bfd/elf64-hppa.c line 3956 in
>> elf64_hppa_relocate_section
>>
>> /tmp/hppa64/bin/hppa64-linux-ld: Please report this bug.
>>
>> make: *** [.tmp_vmlinux2] Error 1
>>
>> Any clues?
> Maybe related to this:
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=13168
>
>
No, the 64-bit linker is different and doesn't have stub support for
long calls. The above
bug is a section merging problem (specifically comdat groups). The
merging prevents
the normal insertion of stub sections. It wouldn't happen if cmake
didn't use vague linking.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: failure to link kernel 3.0.3 with cross binutils-2.21.1/gcc-4.6.1
2011-09-13 7:20 failure to link kernel 3.0.3 with cross binutils-2.21.1/gcc-4.6.1 Graham Gower
2011-09-13 7:48 ` Rolf Eike Beer
@ 2011-09-13 13:55 ` John David Anglin
2011-09-14 1:44 ` Graham Gower
1 sibling, 1 reply; 5+ messages in thread
From: John David Anglin @ 2011-09-13 13:55 UTC (permalink / raw)
To: Graham Gower; +Cc: linux-parisc
On 9/13/2011 3:20 AM, Graham Gower wrote:
> /tmp/hppa64/bin/hppa64-linux-ld:
> arch/parisc/mm/built-in.o(.init.text+0xed0): cannot reach
> flush_tlb_all_local
> /tmp/hppa64/bin/hppa64-linux-ld: BFD (GNU Binutils) 2.21.1 internal
> error, aborting at ../../binutils-2.21.1/bfd/elf64-hppa.c line 3956 in
> elf64_hppa_relocate_section
>
> Any clues?
Check the relocation at arch/parisc/mm/built-in.o(.init.text+0xed0) with
readelf
or objdump. It should be R_PARISC_PCREL22F. If this isn't a 22-bit branch,
then the call needs changing (e.g., change a bl to b,l).
If this is a 22-bit call, then you will have to remove some stuff from
your .config.
Maybe use more modules.
The hppa64 linker doesn't have stub support for long calls. The maximum
branch distance (R_PARISC_PCREL22F) is 8388608 bytes.
Stub support could be added to hppa64 in a manner similar to that for
hppa32,
but there isn't a 64-bit userspace except on HP-UX. On HP-UX, the HP linker
is better. I made a number of changes a few years ago to make this possible
but there's still quite a bit of work involved.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-14 1:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 7:20 failure to link kernel 3.0.3 with cross binutils-2.21.1/gcc-4.6.1 Graham Gower
2011-09-13 7:48 ` Rolf Eike Beer
2011-09-13 14:03 ` John David Anglin
2011-09-13 13:55 ` John David Anglin
2011-09-14 1:44 ` Graham Gower
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.