The test was showing that when --strip-unneeded is specified for an executable, all the symbols are stripped. However, the set of symbols used in the test would be stripped by --strip-unneeded for an ET_REL object too. Fix this by adding additional symbols that aren't normally stripped by --strip-unneeded.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
40 ms | x64 debian > Flang.Semantics::resolve102.f90 |
Event Timeline
llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test | ||
---|---|---|
14 | If I change ET_EXEC to ET_REL, the test fails as intended. Adding more tests is fine. Perhaps we need two tests (use something like Type: [[type]]). |
llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test | ||
---|---|---|
14 | I can add a test case here that shows the same input (but ET_REL instead) does produce a symbol table, if you want, to act as a validity test, but that overlaps other tests (see for example strip-unneeded.test). I think there is some benefit still, because it ensures the CHECK-NOT with no other checks is somewhat safe. |
If I change ET_EXEC to ET_REL, the test fails as intended.
Adding more tests is fine. Perhaps we need two tests (use something like Type: [[type]]).