Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-11-02 Thread Michael Ellerman
Alan Modra writes: > On Thu, Nov 01, 2018 at 02:55:34PM +1100, Michael Ellerman wrote: >> Hi Florian, >> >> Florian Weimer writes: >> > We tried to use Go to build PIE binaries, and while the Go toolchain is >> > definitely not ready (it produces text relocations and problematic >> > relocations

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-11-02 Thread Michael Ellerman
Florian Weimer writes: > * Michael Ellerman: > >> Hi Florian, >> >> Florian Weimer writes: >>> We tried to use Go to build PIE binaries, and while the Go toolchain is >>> definitely not ready (it produces text relocations and problematic >>> relocations in general), it exposed what could be an ac

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-11-01 Thread Florian Weimer
* Michael Ellerman: > Hi Florian, > > Florian Weimer writes: >> We tried to use Go to build PIE binaries, and while the Go toolchain is >> definitely not ready (it produces text relocations and problematic >> relocations in general), it exposed what could be an accidental >> userspace ABI change.

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Alan Modra
On Thu, Nov 01, 2018 at 02:55:34PM +1100, Michael Ellerman wrote: > Hi Florian, > > Florian Weimer writes: > > We tried to use Go to build PIE binaries, and while the Go toolchain is > > definitely not ready (it produces text relocations and problematic > > relocations in general), it exposed wha

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Michael Ellerman
Hi Florian, Florian Weimer writes: > We tried to use Go to build PIE binaries, and while the Go toolchain is > definitely not ready (it produces text relocations and problematic > relocations in general), it exposed what could be an accidental > userspace ABI change. > > With our 4.10-derived ker

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Michal Suchánek
On Wed, 31 Oct 2018 19:04:14 -0300 Tulio Magno Quites Machado Filho wrote: > Florian Weimer writes: > > > * Tulio Magno Quites Machado Filho: > > > >> I wonder if this is restricted to linker that Golang uses. > >> Were you able to reproduce the same problem with Binutils' > >> linker? > >

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Benjamin Herrenschmidt
On Wed, 2018-10-31 at 18:54 +0100, Florian Weimer wrote: > > It would matter to C code which returns the address of a global variable > in the main program through and (implicit) int return value. > > The old behavior hid some pointer truncation issues. Hiding bugs like that is never a good idea

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Tulio Magno Quites Machado Filho
Florian Weimer writes: > * Tulio Magno Quites Machado Filho: > >> I wonder if this is restricted to linker that Golang uses. >> Were you able to reproduce the same problem with Binutils' linker? > > The example is carefully constructed to use the external linker. It > invokes gcc, which then inv

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Tulio Magno Quites Machado Filho
Florian Weimer writes: > * Michal Suchánek: > >> On Wed, 31 Oct 2018 18:20:56 +0100 >> Florian Weimer wrote: >> >>> And it needs to be built with: >>> >>> go build -ldflags=-extldflags=-pie extld.go >>> >>> I'm not entirely sure what to make of this, but I'm worried that this >>> could be a

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Florian Weimer
* Tulio Magno Quites Machado Filho: > Florian Weimer writes: > >> * Michal Suchánek: >> >>> On Wed, 31 Oct 2018 18:20:56 +0100 >>> Florian Weimer wrote: >>> And it needs to be built with: go build -ldflags=-extldflags=-pie extld.go I'm not entirely sure what to make

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Florian Weimer
* Michal Suchánek: > On Wed, 31 Oct 2018 18:20:56 +0100 > Florian Weimer wrote: > >> We tried to use Go to build PIE binaries, and while the Go toolchain >> is definitely not ready (it produces text relocations and problematic >> relocations in general), it exposed what could be an accidental >>

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-10-31 Thread Michal Suchánek
On Wed, 31 Oct 2018 18:20:56 +0100 Florian Weimer wrote: > We tried to use Go to build PIE binaries, and while the Go toolchain > is definitely not ready (it produces text relocations and problematic > relocations in general), it exposed what could be an accidental > userspace ABI change. > > Wi