[PATCH] D76915: [LLD][ELF] Allow empty (.init|.preinit|.fini)_array to be RELRO

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 02:42:52 PDT 2020


grimar added inline comments.


================
Comment at: lld/test/ELF/relro-init-fini-script.s:14
+// RUN: ld.lld %t.o -o %t.so --shared --script=%t.script
+// RUN: llvm-readelf -S %t.so | FileCheck %s
+// RUN: llvm-readobj --segments %t.so | FileCheck %s --check-prefix=PHDR
----------------
I`d suggest using  `llvm-readelf -S -segments` then:
there is no need to have both `llvm-readelf` and `llvm-readobj` calls I think.

(Then perhaps you will be able to use `{{0+}}[[# ADDR]]` check to test PT_GNU_RELRO`s VA).



================
Comment at: lld/test/ELF/relro-init-fini-script.s:32
+// PHDR-NEXT: FileSize: 280
+ .section .data.rel.ro, "aw", %progbits
+ .global foo
----------------
Missing an empty line after before ".section .data.rel.ro ...."


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76915/new/

https://reviews.llvm.org/D76915





More information about the llvm-commits mailing list