Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2017 01:04:10 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Bug 215821 for TARGET_ARCH=powerpc64: bootstrapped ld produces a "shared object" when given a -pie option; junk kernel produced crashes
Message-ID:  <496BD75E-3D29-4717-BDE8-9AAFCA27FD0C@dsl-only.net>

next in thread | raw e-mail | index | archive | help
I have submitted a FreeBSD bugzilla entry:

Bug 215821 - head -r311147's bootstrapped ld for TARGET_ARCH=3Dpowerpc64 =
produces kernel.full as a "shared object" for -pie instead of as a =
"executable": booting the produced kernel crashes

In essence what the .meta file for kernel.full shows as:

CMD @ld -Bdynamic -T /usr/src/sys/conf/ldscript.powerpc64 -pie =
--no-warn-mismatch  --warn-common --export-dynamic --dynamic-linker =
/red/herring  -o kernel.full -X locore.o . . .

(note the -pie) ends up producing:

ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 =
(FreeBSD), dynamically linked, interpreter /red/herring, not stripped

instead of what it should have produced:

ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 =
(FreeBSD), dynamically linked, interpreter /red/herring, not stripped

The differences in content leads to the powerpc64 crashing at the start =
of the produced kernel.

This means needing to use devel/binutils and/or devel/powerpc64-binutils =
instead (at least for ld).

=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?496BD75E-3D29-4717-BDE8-9AAFCA27FD0C>