This is an archive of the discontinued LLVM Phabricator instance.

[lld test] Tighten ELF/pre_init_fini_array.s test

Authored by thopre on Mar 26 2020, 7:53 AM.



Make use of FileCheck numeric variable to tighten symbol address checks
in ELF/pre_init_fini_array.s test.

Diff Detail

Event Timeline

thopre created this revision.Mar 26 2020, 7:53 AM
thopre updated this revision to Diff 252877.Mar 26 2020, 9:16 AM

Incorporate DISASM improvements from D75631

Thanks for the improvement. This is definitely more robust. llvm-readobj's section/symbol dump is known to be verbose. llvm-readelf -S -s is conciser/better. Can you check whether the new FileCheck feature (D60389 help with llvm-readelf -S -s output?

Looks good from my perspective. I'll leave it up to @MaskRay to approve once you've taken a look at his suggestion.

thopre updated this revision to Diff 253118.Mar 27 2020, 7:40 AM

Use readelf instead of readobj

MaskRay accepted this revision.Mar 27 2020, 11:16 AM

Looks great!


-S --dynamic -r -s (or -S -d -r -s) is better because the option order matches the output order.


Section Headers:


Value is misaligned.

This revision is now accepted and ready to land.Mar 27 2020, 11:16 AM
thopre updated this revision to Diff 253225.Mar 27 2020, 2:43 PM
thopre marked 3 inline comments as done.

Address last set of comments

This revision was automatically updated to reflect the committed changes.