From: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Paolo Bonzini <bonzini@gnu.org>, Riku Voipio <riku.voipio@iki.fi>,
qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>,
Juan Quintela <quintela@trasno.org>
Subject: Re: [Qemu-devel] [PATCH v4 2/2] Build usermode targets as PIE
Date: Fri, 04 Sep 2009 11:58:37 +0200 [thread overview]
Message-ID: <877hwfhvzm.fsf@lechat.rtp-net.org> (raw)
In-Reply-To: <1252067286-21758-2-git-send-email-kirill@shutemov.name> (Kirill A. Shutemov's message of "Fri\, 4 Sep 2009 15\:28\:06 +0300")
"Kirill A. Shutemov" <kirill@shutemov.name> writes:
Hi,
[...]
> +cat > $TMPC <<EOF
> +int main() {
> + static __thread int i = 0;
> + i++;
> + return 0;
> +}
> +EOF
> +
> +if test "$user_pie" != "no" ; then
> + if compile_prog "-fpie" "-pie -Wl,--fatal-warnings -Wl,--warn-shared-textrel"; then
> + user_pie="yes"
> + else
> + if test "$user_pie" = "yes"; then
> + echo "Toolchain has no proper PIE support"
> + exit 1
> + else
> + user_pie="no"
> + fi
> + fi
> +fi
Unfortunately, the broken mips toolchain pass this test. When you
compile, you're getting no warning at all. Moreover, the failure is
triggered at run-time (and this test doesn't trigger it). See
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526961 if you want
something which segfault with pie.
I don't know if there are some other non-mips toolchains with broken pie
and what's their behaviour. I hope it's crashing too...
Arnaud
next prev parent reply other threads:[~2009-09-04 9:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 12:28 [Qemu-devel] [PATCH v4 1/2] Do not link usermode targets with libhw*.a Kirill A. Shutemov
2009-09-04 12:28 ` [Qemu-devel] [PATCH v4 2/2] Build usermode targets as PIE Kirill A. Shutemov
2009-09-04 9:58 ` Arnaud Patard [this message]
2009-09-04 10:14 ` Kirill A. Shutemov
2009-09-07 8:29 ` Arnaud Patard
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=877hwfhvzm.fsf@lechat.rtp-net.org \
--to=arnaud.patard@rtp-net.org \
--cc=bonzini@gnu.org \
--cc=kirill@shutemov.name \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@trasno.org \
--cc=riku.voipio@iki.fi \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.