ELF: Teach the linker about the 'B' augmentation string character.
This character indicates that when return pointer authentication is being used, the function signs the return address using the B key. Differential Revision: https://reviews.llvm.org/D93954
This commit is contained in:
parent
cdfd4c5c1a
commit
aed84542d5
|
@ -194,7 +194,7 @@ uint8_t EhReader::getFdeEncoding() {
|
|||
readByte();
|
||||
else if (c == 'P')
|
||||
skipAugP();
|
||||
else if (c != 'S')
|
||||
else if (c != 'B' && c != 'S')
|
||||
failOn(aug.data(), "unknown .eh_frame augmentation string: " + aug);
|
||||
}
|
||||
return DW_EH_PE_absptr;
|
||||
|
@ -211,7 +211,7 @@ bool EhReader::hasLSDA() {
|
|||
skipAugP();
|
||||
else if (c == 'R')
|
||||
readByte();
|
||||
else if (c != 'S')
|
||||
else if (c != 'B' && c != 'S')
|
||||
failOn(aug.data(), "unknown .eh_frame augmentation string: " + aug);
|
||||
}
|
||||
return false;
|
||||
|
|
9
lld/test/ELF/eh-frame-cfi-b-key.s
Normal file
9
lld/test/ELF/eh-frame-cfi-b-key.s
Normal file
|
@ -0,0 +1,9 @@
|
|||
// REQUIRES: aarch64
|
||||
// RUN: llvm-mc -filetype=obj -triple aarch64-arm-none-eabi %s -o %t.o
|
||||
// RUN: ld.lld %t.o -o %t --icf=all --eh-frame-hdr
|
||||
|
||||
.globl _start
|
||||
_start:
|
||||
.cfi_startproc
|
||||
.cfi_b_key_frame
|
||||
.cfi_endproc
|
Loading…
Reference in New Issue
Block a user