diff options
Diffstat (limited to 'scripts/recordmcount.pl')
-rwxr-xr-x | scripts/recordmcount.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index e67f05486087..858966ab019c 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
@@ -130,9 +130,11 @@ if ($inputfile =~ m,kernel/trace/ftrace\.o$,) { | |||
130 | # Acceptable sections to record. | 130 | # Acceptable sections to record. |
131 | my %text_sections = ( | 131 | my %text_sections = ( |
132 | ".text" => 1, | 132 | ".text" => 1, |
133 | ".ref.text" => 1, | ||
133 | ".sched.text" => 1, | 134 | ".sched.text" => 1, |
134 | ".spinlock.text" => 1, | 135 | ".spinlock.text" => 1, |
135 | ".irqentry.text" => 1, | 136 | ".irqentry.text" => 1, |
137 | ".kprobes.text" => 1, | ||
136 | ".text.unlikely" => 1, | 138 | ".text.unlikely" => 1, |
137 | ); | 139 | ); |
138 | 140 | ||
@@ -221,6 +223,7 @@ if ($arch eq "x86_64") { | |||
221 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$"; | 223 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$"; |
222 | $type = ".quad"; | 224 | $type = ".quad"; |
223 | $alignment = 8; | 225 | $alignment = 8; |
226 | $mcount_adjust = -1; | ||
224 | 227 | ||
225 | # force flags for this arch | 228 | # force flags for this arch |
226 | $ld .= " -m elf_x86_64"; | 229 | $ld .= " -m elf_x86_64"; |
@@ -230,6 +233,7 @@ if ($arch eq "x86_64") { | |||
230 | 233 | ||
231 | } elsif ($arch eq "i386") { | 234 | } elsif ($arch eq "i386") { |
232 | $alignment = 4; | 235 | $alignment = 4; |
236 | $mcount_adjust = -1; | ||
233 | 237 | ||
234 | # force flags for this arch | 238 | # force flags for this arch |
235 | $ld .= " -m elf_i386"; | 239 | $ld .= " -m elf_i386"; |
@@ -239,12 +243,14 @@ if ($arch eq "x86_64") { | |||
239 | 243 | ||
240 | } elsif ($arch eq "s390" && $bits == 32) { | 244 | } elsif ($arch eq "s390" && $bits == 32) { |
241 | $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_32\\s+_mcount\$"; | 245 | $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_32\\s+_mcount\$"; |
246 | $mcount_adjust = -4; | ||
242 | $alignment = 4; | 247 | $alignment = 4; |
243 | $ld .= " -m elf_s390"; | 248 | $ld .= " -m elf_s390"; |
244 | $cc .= " -m31"; | 249 | $cc .= " -m31"; |
245 | 250 | ||
246 | } elsif ($arch eq "s390" && $bits == 64) { | 251 | } elsif ($arch eq "s390" && $bits == 64) { |
247 | $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$"; | 252 | $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$"; |
253 | $mcount_adjust = -8; | ||
248 | $alignment = 8; | 254 | $alignment = 8; |
249 | $type = ".quad"; | 255 | $type = ".quad"; |
250 | $ld .= " -m elf64_s390"; | 256 | $ld .= " -m elf64_s390"; |
@@ -270,6 +276,8 @@ if ($arch eq "x86_64") { | |||
270 | } elsif ($arch eq "arm") { | 276 | } elsif ($arch eq "arm") { |
271 | $alignment = 2; | 277 | $alignment = 2; |
272 | $section_type = '%progbits'; | 278 | $section_type = '%progbits'; |
279 | $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_ARM_(CALL|PC24|THM_CALL)" . | ||
280 | "\\s+(__gnu_mcount_nc|mcount)\$"; | ||
273 | 281 | ||
274 | } elsif ($arch eq "ia64") { | 282 | } elsif ($arch eq "ia64") { |
275 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$"; | 283 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$"; |