diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index faac4b10d8eaf..fb0d25ced2fb3 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -261,7 +261,11 @@ if ($arch eq "x86_64") { # force flags for this arch $ld .= " -m shlelf_linux"; - $objcopy .= " -O elf32-sh-linux"; + if ($endian eq "big") { + $objcopy .= " -O elf32-shbig-linux"; + } else { + $objcopy .= " -O elf32-sh-linux"; + } } elsif ($arch eq "powerpc") { $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";