Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 2019 14:53:12 -0500
From:      Justin Hibbits <jrh29@alumni.cwru.edu>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: FreeBSD/powerpc and FreeBSD/powerpcspe toolchain update
Message-ID:  <20190627145312.5abd82e7@titan.knownspace>
In-Reply-To: <CE47F595-68EF-43A2-877B-61C1981AF9E7@yahoo.com>
References:  <CAHSQbTBjZFb1dPk2FN=438i0FVtAKHYy-y22L%2BHFEDrTmd-9Aw@mail.gmail.com> <CE47F595-68EF-43A2-877B-61C1981AF9E7@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Jun 2019 12:03:05 -0700
Mark Millard <marklmi@yahoo.com> wrote:

> On 2019-Jun-24, at 19:40, Justin Hibbits <jrh29@alumni.cwru.edu>
> wrote:
> 
> > As of r349351 32-bit powerpc toolchains need to be rebuilt as part
> > of buildworld, in order to take advantage of the new Secure
> > Procedure Linkage Table (Secure-PLT) format.  This can be done by
> > passing "WITHOUT_SYSTEM_TOOLCHAIN=" on the 'make buildworld'
> > command line.
> > 
> > Cross-building should work fine with no changes, as that already
> > builds a new toolchain.  If building with an external toolchain,
> > such as gcc8, add 'CFLAGS+= -msecure-plt' to /etc/src.conf to
> > ensure the new PLT is used, otherwise it will default to BSS-PLT,
> > which is fully compatible, but not as secure.  There is breakage
> > intended at all, so please let me know if there are any problems.  
> 
> My attempt to amd64->powerpc (32-bit) cross build from/to head
> -r349444 via system clang and lld got the following. This may not be
> a recent change. It has been a long time since I tried lld, instead
> using devel/powerpc64-binutils. ( devel/powerpc64-binutils now fails
> where it used to work, but I sent a separate note out about that. )
> 
> --- agp.ko.full ---
> ld: agp.kld(.text+0x37a4): R_PPC_PLTREL24 reloc against local symbol
> agp.kld: could not read symbols: Bad value
> *** [agp.ko.full] Error code 1
> 

Hi Mark,

Can you determine what symbol has that relocation?  I don't see that
error when building natively, or cross-building with base toolchain, so
there's very likely a change in binutils between 2.17 and now that's
leading to this failure.

> 
> ===
> Mark Millard
> marklmi at yahoo.com
> ( dsl-only.net went
> away in early 2018-Mar)
> 

- Justin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190627145312.5abd82e7>