From: "Michal Suchánek" <msuchanek@suse.de>
To: Tulio Magno Quites Machado Filho <tuliom@ascii.art.br>
Cc: Florian Weimer <fweimer@redhat.com>,
"Lynn A. Boger" <laboger@linux.ibm.com>,
linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: PIE binaries are no longer mapped below 4 GiB on ppc64le
Date: Wed, 31 Oct 2018 23:41:40 +0100 [thread overview]
Message-ID: <20181031234140.70021082@naga.suse.cz> (raw)
In-Reply-To: <87bm79n57l.fsf@linux.ibm.com>
On Wed, 31 Oct 2018 19:04:14 -0300
Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> wrote:
> Florian Weimer <fweimer@redhat.com> 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 invokes the BFD linker in my case.
>
> Indeed. That question was unnecessary. :-D
>
> > Based on the relocations, I assume there is only so much the linker
> > can do here. I'm amazed that it produces an executable at all, let
> > alone one that runs correctly on some kernel versions!
>
> Agreed. That isn't expected to work. Both the compiler and the
> linker have to generate PIE for it to work.
>
> > I assume that the Go toolchain simply lacks PIE support on
> > ppc64le.
>
> Maybe the support is there, but it doesn't generate PIC by default?
>
golang has -fPIC IIRC. It does not benefit from the GNU toolchian
synergy of always calling the linker with the correct flags
corresponding to the generated code, though. So when gcc flips the
switch default value golang happily produces incompatible objects.
Also I suspect some pieces of stdlib are not compiled with the flags
you pass in for the build so there are always some objects somewhere
that are not compatible.
Thanks
Michal
next prev parent reply other threads:[~2018-10-31 22:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 17:20 Florian Weimer
2018-10-31 17:50 ` Michal Suchánek
2018-10-31 17:54 ` Florian Weimer
2018-10-31 21:23 ` Tulio Magno Quites Machado Filho
2018-10-31 21:28 ` Florian Weimer
2018-10-31 22:04 ` Tulio Magno Quites Machado Filho
2018-10-31 22:41 ` Michal Suchánek [this message]
2018-10-31 22:24 ` Benjamin Herrenschmidt
2018-11-02 4:38 ` Nick Piggin
2018-11-01 3:55 ` Michael Ellerman
2018-11-01 6:49 ` Alan Modra
2018-11-02 9:41 ` Michael Ellerman
2018-11-01 11:20 ` Florian Weimer
2018-11-02 9:37 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181031234140.70021082@naga.suse.cz \
--to=msuchanek@suse.de \
--cc=fweimer@redhat.com \
--cc=laboger@linux.ibm.com \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tuliom@ascii.art.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox