aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.target7
-rw-r--r--linux-user/main.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.target b/Makefile.target
index 95ea886404..cb6a0cc60a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -39,7 +39,14 @@ OP_CFLAGS+= -falign-functions=0
else
OP_CFLAGS+= -malign-functions=0
endif
+
ifdef TARGET_GPROF
+USE_I386_LD=y
+endif
+ifdef CONFIG_STATIC
+USE_I386_LD=y
+endif
+ifdef USE_I386_LD
LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld
else
# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
diff --git a/linux-user/main.c b/linux-user/main.c
index 6df7b42c5e..5b751541ee 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -30,7 +30,7 @@
static const char *interp_prefix = CONFIG_QEMU_PREFIX;
-#ifdef __i386__
+#if defined(__i386__) && !defined(CONFIG_STATIC)
/* Force usage of an ELF interpreter even if it is an ELF shared
object ! */
const char interp[] __attribute__((section(".interp"))) = "/lib/ld-linux.so.2";