[PATCH] D76915: [LLD][ELF] Allow empty (.init|.preinit|.fini)_array to be RELRO
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 28 10:12:19 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/test/ELF/relro-init-fini-script.s:19
+
+// CHECK: Type: PT_GNU_RELRO
+// CHECK-NEXT: Offset: 0x2000
----------------
It is not very clear what the 3 CHECK lines are about...
See `pre_init_fini_array.s` (D76852)
Suggest:
```
// RUN: llvm-readelf -S %t.so | FileCheck %s
// CHECK: Name Type Address
// CHECK: .preinit_array PROGBITS {{0+}}[[# %x,ADDR:]]
// CHECK-NEXT: .init_array PROGBITS {{0+}}[[# ADDR]]
// CHECK-NEXT: .fini_array PROGBITS {{0+}}[[# ADDR]]
// CHECK-NEXT: .data.rel.ro PROGBITS {{0+}}[[# ADDR]]
```
================
Comment at: lld/test/ELF/relro-init-fini-script.s:23
+
+ .section .data.rel.ro, "aw", %progbits
+ .global foo
----------------
Nit: the indentation is not needed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76915/new/
https://reviews.llvm.org/D76915
More information about the llvm-commits
mailing list