310-mips-link-tool.patch 1.4 KB

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