[PATCH] D52094: lld: add -z interpose support

Ed Maste via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 07:22:59 PDT 2018


emaste added inline comments.


================
Comment at: test/ELF/dt_flags.s:10-13
+# RUN: ld.lld -z interpose \
+# RUN:   -Bsymbolic %t %t.so -o %t1
+# RUN: llvm-readobj -dynamic-table %t1 | FileCheck -check-prefix=INTERPOSE %s
+
----------------
grimar wrote:
> emaste wrote:
> > I think it makes sense to validate flags individually to ensure we don't mix up bits or accidentally set flags we shouldn't, but I will just add it to the list in `FLAGS:` above if that's desired.
> I would be consistent with the existent test and reuse `FLAGS`
I can make that change, although the test coverage is not as good; I made this part of the change first:
```
 # RUN: ld.lld -z global -z initfirst -z now -z nodelete -z nodlopen -z origin \
-# RUN:   -Bsymbolic %t %t.so -o %t1
+# RUN:   -z interpose -Bsymbolic %t %t.so -o %t1
 # RUN: llvm-readobj -dynamic-table %t1 | FileCheck -check-prefix=FLAGS %s
```
and the test still passed, because the new `INTERPOSE` flag is at the end and `FLAGS:   0x000000006FFFFFFB FLAGS_1 NOW GLOBAL NODELETE INITFIRST NOOPEN ORIGIN` still matches.



https://reviews.llvm.org/D52094





More information about the llvm-commits mailing list