valgrind: improve mips support
[openwrt/staging/yousong.git] / package / devel / valgrind / patches / 310-mips-link-tool.patch
1 r15754 | petarj | 2015-12-29 20:14:37 +0100 (Tue, 29 Dec 2015) | 8 lines
2
3 mips: remove link script exception for MIPS arch
4
5 Current toolchains on MIPS targets that we care about are reasonably
6 modern and we do not need this link script exception for MIPS anymore.
7
8 This should fix issues with newer toolchain versions and .MIPS.abiflags
9 section.
10
11 --- a/coregrind/link_tool_exe_linux.in
12 +++ b/coregrind/link_tool_exe_linux.in
13 @@ -69,24 +69,7 @@ shift; # Remove $ala from @ARGV
14 die "Bogus alt-load address"
15 if (length($ala) < 3 || index($ala, "0x") != 0);
16
17 -# For mips32 or mips64 we need to use "--section-start=.reginfo=$ala" or
18 -# "--section-start=.MIPS.options=$ala" respectively, because "-Ttext=$ala" will
19 -# not put all the sections to the specificed address ($ala).
20 -my $x = `cat ../config.log 2>&1 | grep host_cpu= | sed "s/host_cpu='//g"`;
21 -my $arch = substr($x, 0, index($x, "'"));
22 -
23 -my $extra_args;
24 -if (($arch eq 'mips') || ($arch eq 'mipsel')
25 - || ($arch eq 'mipsisa32r2el')) {
26 - $extra_args = "-static -Wl,--section-start=.reginfo=$ala";
27 -} elsif (($arch eq 'mips64') || ($arch eq 'mips64el') ||
28 - ($arch eq 'mipsisa64el')) {
29 - $extra_args = "-static -Wl,--section-start=.MIPS.options=$ala";
30 -} else {
31 - $extra_args = "-static -Wl,@FLAG_T_TEXT@=$ala";
32 -}
33 -
34 -my $cmd = join(" ", @ARGV, $extra_args);
35 +my $cmd = join(" ", @ARGV, "-static -Wl,@FLAG_T_TEXT@=$ala");
36
37 #print "link_tool_exe_linux: $cmd\n";
38