File tree Expand file tree Collapse file tree 1 file changed +32
-5
lines changed Expand file tree Collapse file tree 1 file changed +32
-5
lines changed Original file line number Diff line number Diff line change 330
330
} if ($flavour =~ / ios64/ );
331
331
332
332
my $paciasp = sub {
333
- ($flavour =~ / linux|cheri/ ) ? " \t .inst \t 0xd503233f "
334
- : & $inst (0xd503233f) ;
333
+ ($flavour =~ / linux|cheri/ ) ? " \t hint \t #PACI_HINT "
334
+ : " \t hint \t #25 " ;
335
335
};
336
336
337
337
my $autiasp = sub {
338
- ($flavour =~ / linux|cheri/ ) ? " \t .inst \t 0xd50323bf "
339
- : & $inst (0xd50323bf) ;
338
+ ($flavour =~ / linux|cheri/ ) ? " \t hint \t #AUTI_HINT "
339
+ : " \t hint \t #29 " ;
340
340
};
341
341
342
342
sub range {
@@ -400,6 +400,17 @@ sub expand_line {
400
400
print <<___ ;
401
401
GBLA __SIZEOF_POINTER__
402
402
__SIZEOF_POINTER__ SETA $1 /8
403
+ ___
404
+ } elsif ($flavour =~ / linux|cheri/ ) {
405
+ print <<___ ;
406
+ #if defined(__ARM_FEATURE_PAC_DEFAULT) && __ARM_FEATURE_PAC_DEFAULT==2
407
+ # define PACI_HINT 27
408
+ # define AUTI_HINT 31
409
+ #else
410
+ # define PACI_HINT 25
411
+ # define AUTI_HINT 29
412
+ #endif
413
+
403
414
___
404
415
}
405
416
@@ -474,6 +485,22 @@ sub expand_line {
474
485
print " \n " ;
475
486
}
476
487
477
- print " \t END\n " if ($flavour =~ / win/ );
488
+ if ($flavour =~ / win/ ) {
489
+ print " \t END\n " ;
490
+ } elsif ($flavour =~ / linux|cheri/ ) {
491
+ # -mbranch-protection=standanrd segment, snatched from compiler -S output
492
+ print <<___ ;
493
+
494
+ #if defined(__ARM_FEATURE_BTI_DEFAULT) || defined(__ARM_FEATURE_PAC_DEFAULT)
495
+ .section .note.GNU-stack,"",\@ progbits
496
+ .section .note.gnu.property,"a",\@ note
497
+ .long 4,2f-1f,5
498
+ .byte 0x47,0x4E,0x55,0
499
+ 1: .long 0xc0000000,4,3
500
+ .align 3
501
+ 2:
502
+ #endif
503
+ ___
504
+ }
478
505
479
506
close STDOUT ;
You can’t perform that action at this time.
0 commit comments