Impact: extend scripts/recordmcount.pl with default alignment for SH Set $alignment=2 for the sh architecture so that a ".align 2" directive will be emitted for all __mcount_loc sections. Fix a whitspace error while I'm here (converted spaces to tabs).
Unified · Split
| @@ -135,7 +135,7 @@ my $section_regex; # Find the start of a section · 134 unmodified lines | ||
| 135 | 135 | my $function_regex; # Find the name of a function |
| 136 | 136 | # (return offset and func name) |
| 137 | 137 | my $mcount_regex; # Find the call site to mcount (return offset) |
| 138 | −my $alignment; # The .align value to use for $mcount_section | |
| 138 | +my $alignment; # The .align value to use for $mcount_section | |
| 139 | 139 | |
| 140 | 140 | if ($arch eq "x86") { |
| 141 | 141 | if ($bits == 64) { |
| @@ -176,6 +176,7 @@ if ($arch eq "x86_64") { · 34 unmodified lines | ||
| 176 | 176 | $cc .= " -m32"; |
| 177 | 177 | |
| 178 | 178 | } elsif ($arch eq "sh") { |
| 179 | + $alignment = 2; | |
| 179 | 180 | |
| 180 | 181 | # force flags for this arch |
| 181 | 182 | $ld .= " -m shlelf_linux"; |