[PATCH] D77807: [LLD][ELF] Implement --discard-* for cases when -r or --emit-relocs are used.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 08:37:16 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/test/ELF/discard-locals-preserve-used.s:39
+# DISCARD-ALL:      .LUsed
+# DISCARD-ALL-NOT:  Unused
+# DISCARD-ALL-NEXT: Used
----------------
`NOT` patterns rely on the symbol order. If the symbol order is disrupted, `NOT` patterns may get stale and don't actually test the (in)existence.

The `--check-prefixes` approach requires update when the symbol order is changed, but at least it will not miss such updates.


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

https://reviews.llvm.org/D77807





More information about the llvm-commits mailing list