Page MenuHomePhabricator

[LLD][ELF] Add test cases for range extension thunks (no linkerscripts)
AbandonedPublic

Authored by peter.smith on Apr 4 2017, 4:47 AM.

Details

Reviewers
ruiu
rafael
Summary

Add test cases for range extension thunks that do not use linkerscripts. These include tests for:

  • OutputSection larger than Thumb2 branch range
  • Range extension thunks to PLT
  • Mix of ARM and Thumb range extension thunks
  • Special case of Thumb condition branch with short range of 1Mb
  • Thunks drifting out of range

Testing range extension thunks isn't pleasant as testing some of the cases needs a single large OutputSection. I've also found that llvm-objdump doesn't handle large files very well so I've had to do multiple calls with restricted address ranges. The disassembly of branch targets is not good either.

Diff Detail

Event Timeline

peter.smith created this revision.Apr 4 2017, 4:47 AM

Updated diff to reflect recent changes to padding between sections. This is patch 10/11 of the range thunks implementation.

ruiu edited edge metadata.Jul 11 2017, 6:57 PM

This looks good, but don't you want to submit these tests with the patches that implement the range extension thunk feature?

peter.smith abandoned this revision.Jul 13 2017, 9:13 AM

I've added these tests into D34691 and D34692 so this revision is no longer needed.