This is an archive of the discontinued LLVM Phabricator instance.

[lld/test/ELF] Test fetch from archive to resolve undefined symbols in shared libs
ClosedPublic

Authored by pirama on Aug 18 2021, 1:54 PM.

Details

Diff Detail

Event Timeline

pirama created this revision.Aug 18 2021, 1:54 PM
pirama requested review of this revision.Aug 18 2021, 1:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2021, 1:54 PM
MaskRay added inline comments.Aug 20 2021, 11:40 AM
lld/test/ELF/undef-in-shared-from-lazy.s
2 ↗(On Diff #367319)
# REQUIRES: x86
## Regular comments.
# RUN:
# CHECK: ...
3 ↗(On Diff #367319)

Consider rm -fr %t && split-file %s %t

4 ↗(On Diff #367319)
21 ↗(On Diff #367319)

Use _start instead of main, then you can omit --entry

Worth checking whether archive-fetch.s can be folded into the test.

pirama updated this revision to Diff 368946.Aug 26 2021, 11:24 AM

Update with review comments.

pirama marked 4 inline comments as done.Aug 26 2021, 11:28 AM

Worth checking whether archive-fetch.s can be folded into the test.

The test was added independent of the code change. Can you point me to the relevant code in InputFiles.cpp? Is it https://github.com/llvm/llvm-project/blob/9b9e7f6f4e05baa99a795e0cce60ba86091acc9a/lld/ELF/InputFiles.cpp#L1804?

MaskRay accepted this revision.Aug 26 2021, 12:09 PM

Looks like archive-fetch.s is unrelated. LG.

I do encourage that contributors try making tests a bit more orthogonal and reorganize tests whenever that makes sense.

undef-in-shared-from-lazy.s => how about dso-undef-extract-lazy?

lld/test/ELF/undef-in-shared-from-lazy.s
35 ↗(On Diff #368946)

Use .s suffix

39 ↗(On Diff #368946)

Use .s suffix

This revision is now accepted and ready to land.Aug 26 2021, 12:09 PM
pirama updated this revision to Diff 369138.Aug 27 2021, 10:44 AM
  • rename file
  • append '.s' to split-file output names
pirama marked 2 inline comments as done.Aug 27 2021, 10:45 AM
pirama added inline comments.
lld/test/ELF/undef-in-shared-from-lazy.s
35 ↗(On Diff #368946)

Added for main above as well.

This revision was automatically updated to reflect the committed changes.
pirama marked an inline comment as done.