From: Nicholas Nethercote Date: Wed, 27 Oct 2004 12:05:59 +0000 (+0000) Subject: Jump through a hoop to make vgtest_ume work again on PIE-supporting systems. X-Git-Tag: svn/VALGRIND_3_0_0~1437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5c3267d907ba1c1c7ca69178c775aa925059f07;p=thirdparty%2Fvalgrind.git Jump through a hoop to make vgtest_ume work again on PIE-supporting systems. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2859 --- diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index e3e274e9c9..14aa31bccc 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -147,8 +147,19 @@ new_override_SOURCES = new_override.cpp # Valgrind unit self-tests hello_SOURCES = hello.c +## If we support PIE, build hello as a PIE, otherwise vgtest_ume cannot load +## (I'm not completely sure why, since stage2 can load both PIEs and non-PIEs, +## maybe it's because stage2 is loaded up high; anyway, it doesn't really +## matter so long as vgtest_ume can load hello ok. --njn) +if USE_PIE +hello_CFLAGS = $(AM_CFLAGS) -fpie +hello_LDFLAGS = -pie +else hello_LDFLAGS = -Wl,-defsym,kickstart_base=0x50000000 \ -Wl,-T,../../coregrind/${VG_ARCH}/stage2.lds +hello_DEPENDENCIES = ../../coregrind/${VG_ARCH}/stage2.lds +endif + vgtest_ume_SOURCES = vgtest_ume.c vgtest_ume_LDADD = ../../coregrind/ume.o \ ../../coregrind/jmp_with_stack.o