From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] libmemcached: don't use -fPIE and -pie with FLAT binaries
Date: Tue, 12 May 2015 14:22:46 +0200 [thread overview]
Message-ID: <20150512142246.590460cb@free-electrons.com> (raw)
In-Reply-To: <87wq0egf7w.fsf@dell.be.48ers.dk>
Dear Peter Korsgaard,
On Tue, 12 May 2015 14:20:03 +0200, Peter Korsgaard wrote:
> That's also the understanding I get from reading:
>
> http://retired.beyondlogic.org/uClinux/bflt.htm
>
> The flat format has its own relocation table that gets applied when
> loading.
Ok.
> I'm not quite sure how this would work with XIP though. The bottom of
> that page mentions that the binary then has to be built in PIC mode.
>
> But my question was actually why we shouldn't disable PIE/PIC for static
> builds in general, and not just for flat mode?
Yes, -fPIC is not needed for static, but it works (it generates
slightly less efficient code though). But I'm fine with turning this
BR2_BINFMT_FLAT condition to a BR2_STATIC_LIBS condition.
But in practice, they are lots of packages that build code only once to
generate both a shared library and a static library, and they use -fPIC
for both. Guaranteeing that all static libraries have non-PIC code
would be a major effort.
Should I resend an updated patch, or will you commit after doing the
change?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-05-12 12:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 20:55 [Buildroot] [PATCH] libmemcached: don't use -fPIE and -pie with FLAT binaries Thomas Petazzoni
2015-05-11 22:17 ` Romain Naour
2015-05-11 22:19 ` Peter Korsgaard
2015-05-12 11:26 ` Thomas Petazzoni
2015-05-12 12:20 ` Peter Korsgaard
2015-05-12 12:22 ` Thomas Petazzoni [this message]
2015-05-12 13:02 ` Peter Korsgaard
2015-05-12 14:17 ` Peter Korsgaard
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=20150512142246.590460cb@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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