|
From: <sv...@va...> - 2014-07-15 09:13:28
|
Author: sewardj
Date: Tue Jul 15 09:13:20 2014
New Revision: 14161
Log:
Fix localise_names so that rodata, bss and common symbols are
also localised.
Modified:
branches/VALGRIND_3_8_BRANCH_BGQ/coregrind/link_tool_exe_linux.in
branches/VALGRIND_3_8_BRANCH_BGQ/coregrind/localise_names
Modified: branches/VALGRIND_3_8_BRANCH_BGQ/coregrind/link_tool_exe_linux.in
==============================================================================
--- branches/VALGRIND_3_8_BRANCH_BGQ/coregrind/link_tool_exe_linux.in (original)
+++ branches/VALGRIND_3_8_BRANCH_BGQ/coregrind/link_tool_exe_linux.in Tue Jul 15 09:13:20 2014
@@ -99,9 +99,12 @@
}
# If we're linking for BGQ, add "-r" at the end so that we produce
-# an ELF relocatable rather than an ELF executable.
+# an ELF relocatable rather than an ELF executable. And "-d" so as
+# to assign space to "common" symbols so that localise_names can
+# then localise them -- apparently objcopy can't localise "C" (common)
+# symbols.
if ($triple eq 'powerpc64-bgq-linux') {
- $cmd = "$cmd -r";
+ $cmd = "$cmd -r -Wl,-d";
}
#print "link_tool_exe_linux: $cmd\n";
Modified: branches/VALGRIND_3_8_BRANCH_BGQ/coregrind/localise_names
==============================================================================
--- branches/VALGRIND_3_8_BRANCH_BGQ/coregrind/localise_names (original)
+++ branches/VALGRIND_3_8_BRANCH_BGQ/coregrind/localise_names Tue Jul 15 09:13:20 2014
@@ -8,10 +8,12 @@
rm -f tmpnames1 tmpnames2
-# get global text/data names into tmpnames1
+# get global text/data/rodata/bss names into tmpnames1
nm $1 | grep " T " > tmpnames1
nm $1 | grep " D " >> tmpnames1
+nm $1 | grep " R " >> tmpnames1
+nm $1 | grep " B " >> tmpnames1
# expecting tmpnames1 to look like this
# 00016904 T AMD64AMode_IR
|