summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKirill A. Shutemov2009-09-12 01:17:54 +0200
committerBlue Swirl2009-09-12 15:15:26 +0200
commitdf70204db53e3611af986f434e74a882bce190ca (patch)
tree34ef56820964e67a57bbdd2038f188f001328721 /configure
parentDo not link usermode targets with libhw*.a (diff)
downloadqemu-df70204db53e3611af986f434e74a882bce190ca.tar.gz
qemu-df70204db53e3611af986f434e74a882bce190ca.tar.xz
qemu-df70204db53e3611af986f434e74a882bce190ca.zip
Fix text relocations in linux-user targets
There is a link hack in linux-user which produces an executable that looks like PIE, but always has text relocations since all object files isn't position-independent (compiled without -fpic/-fpie). Dynamic loader has to do more work to load a binary with text relocations. The best way to keep this functionality is to build a true PIE without text relocations. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 1 insertions, 11 deletions
diff --git a/configure b/configure
index 5970ca87b4..cb1c29f5be 100755
--- a/configure
+++ b/configure
@@ -2376,16 +2376,6 @@ fi
linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/\$(ARCH).ld"
if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
case "$ARCH" in
- i386)
- if test "$gprof" = "yes" -o "$static" = "yes" ; then
- ldflags="$linker_script $ldflags"
- else
- # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
- # that the kernel ELF loader considers as an executable. I think this
- # is the simplest way to make it self virtualizable!
- ldflags="-Wl,-shared $ldflags"
- fi
- ;;
sparc)
# -static is used to avoid g1/g3 usage by the dynamic linker
ldflags="$linker_script -static $ldflags"
@@ -2393,7 +2383,7 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
ia64)
ldflags="-Wl,-G0 $linker_script -static $ldflags"
;;
- x86_64|ppc|ppc64|s390|sparc64|alpha|arm|m68k|mips|mips64)
+ i386|x86_64|ppc|ppc64|s390|sparc64|alpha|arm|m68k|mips|mips64)
ldflags="$linker_script $ldflags"
;;
esac