[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 2/2] Build usermode targets as PIE
From: |
Rtp |
Subject: |
Re: [Qemu-devel] [PATCH v4 2/2] Build usermode targets as PIE |
Date: |
Fri, 04 Sep 2009 11:58:37 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
"Kirill A. Shutemov" <address@hidden> 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