Provide a way to avoid ADRP instructions to make code 100% position independent.
| Bugzilla Link | 37543 |
| Version | 6.0 |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DMG862 |
Extended Description
For environments where code will be executed and cannot meet the page alignment requirements of ADRP, it would be nice to be able to tell the compiler that emitting ADRP instructions are not necessary.
A good option might be to implement 'tiny' for mcmodel
The primary goal is for 100% position independent code.
Please see http://lists.llvm.org/pipermail/llvm-dev/2018-May/123465.html for a discussion of this issue.
Hello
Tiny code code has been implemented in rL340397. It is fresh off the presses, and does not currently handle TLS relocations, in case that is something that you need.
It should allow pic code without relying on page boundaries (although this was not the main motivation and may not be tested well). If you find any places it is not as pic as you'd expect, I'm interested to see where and why.
Let me know if you try it, how it goes. Dave