
Previously, the `SHF_AARCH64_PURECODE` section flag wasn't added to the implicitly created `.text` section if the module didn't contain any functions, because no other section had the flag set. Now, the `SHF_AARCH64_PURECODE` is always added if the "+execute-only" target feature is set for the module during compilation.
14 lines
405 B
LLVM
14 lines
405 B
LLVM
; RUN: llc -filetype=obj -mtriple=aarch64 -mattr=+execute-only %s -o %t.o
|
|
; RUN: llvm-readobj -S %t.o | FileCheck %s
|
|
|
|
; CHECK: Name: .text
|
|
; CHECK-NEXT: Type: SHT_PROGBITS
|
|
; CHECK-NEXT: Flags [
|
|
; CHECK-NEXT: SHF_AARCH64_PURECODE
|
|
; CHECK-NEXT: SHF_ALLOC
|
|
; CHECK-NEXT: SHF_EXECINSTR
|
|
; CHECK-NEXT: ]
|
|
; CHECK-NEXT: Address:
|
|
; CHECK-NEXT: Offset:
|
|
; CHECK-NEXT: Size: 0
|