Skip to content

Commit f22c363

Browse files
Kuan-Ying Leeakpm00
Kuan-Ying Lee
authored andcommitted
scripts/checkstack.pl: fix no space expression between sp and offset
When I use older version aarch64 objdump (2.24) to disassemble aarch64 vmlinux, I get the result like below. There is no space between sp and offset. ffff800008010000 <dw_apb_ictl_handle_irq>: ffff800008010000: d503233f hint #0x19 ffff800008010004: a9bc7bfd stp x29, x30, [sp,#-64]! ffff800008010008: 90011e60 adrp x0, ffff80000a3dc000 <num_ictlrs> ffff80000801000c: 910003fd mov x29, sp ffff800008010010: a9025bf5 stp x21, x22, [sp,torvalds#32] When I use newer version aarch64 objdump (2.35), I get the result like below. There is a space between sp and offset. ffff800008010000 <dw_apb_ictl_handle_irq>: ffff800008010000: d503233f paciasp ffff800008010004: a9bc7bfd stp x29, x30, [sp, #-64]! ffff800008010008: 90011e60 adrp x0, ffff80000a3dc000 <num_ictlrs> ffff80000801000c: 910003fd mov x29, sp ffff800008010010: a9025bf5 stp x21, x22, [sp, torvalds#32] Add no space support of regular expression for old version objdump. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kuan-Ying Lee <[email protected]> Cc: Casper Li <[email protected]> Cc: AngeloGioacchino Del Regno <[email protected]> Cc: Chinwen Chang <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Qun-Wei Lin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 22bb6bc commit f22c363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/checkstack.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
if ($arch =~ '^(aarch|arm)64$') {
5757
#ffffffc0006325cc: a9bb7bfd stp x29, x30, [sp, #-80]!
5858
#a110: d11643ff sub sp, sp, #0x590
59-
$re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;
59+
$re = qr/^.*stp.*sp, ?\#-([0-9]{1,8})\]\!/o;
6060
$dre = qr/^.*sub.*sp, sp, #(0x$x{1,8})/o;
6161
} elsif ($arch eq 'arm') {
6262
#c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64

0 commit comments

Comments
 (0)