[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:53 PDT 2020
grimar accepted this revision.
grimar added a comment.
LGTM with 2 nits.
================
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
----------------
grimar wrote:
> 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).
>
> (Then perhaps you will be able to use {{0+}}[[# ADDR]] check to test PT_GNU_RELRO`s VA).
Ah, though it is not needed, with `llvm-readelf -segments` you can just test the same what is now tested with `llvm-readobj`: VA and size of the `PT_GNU_RELRO`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76915/new/
https://reviews.llvm.org/D76915
More information about the llvm-commits
mailing list