Write out the plt header and stub.
Hexagon uses RELA relocations
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/Arch/Hexagon.cpp | ||
---|---|---|
44 ↗ | (On Diff #166332) | The ABI does support Lazy binding, |
ELF/Arch/Hexagon.cpp | ||
---|---|---|
44 ↗ | (On Diff #166332) | I can add the header, I didn't because it wasn't getting used. |
ELF/Arch/Hexagon.cpp | ||
---|---|---|
235 ↗ | (On Diff #167204) | We fill gaps with a trap instruction. Is 0x00 a formal trap instruction (e.g. INT3 on x86)? If not, please choose a trap instruction for Hexagon ISA and replace 0x00 with that instruction. Also, why do we have a padding at end of each PLT entry? Can we simply remove them? |
Swap zero pad with nop insn pad.
Reduce the padding but still bring plt0 to a 16byte alignment. There was no obvious reason for the additional padding and it is not part of the ABI.
ELF/Arch/Hexagon.cpp | ||
---|---|---|
232 ↗ | (On Diff #167376) | OK, the blank line isn't needed. |
ELF/Arch/Hexagon.cpp | ||
---|---|---|
236 ↗ | (On Diff #167376) | OK, a trap, fine. Only after I submit do I carefully read the comments. |
Remove the blank line
Put a trap into the gap between the PLT header and plt0.
Update testcase
ELF/Arch/Hexagon.cpp | ||
---|---|---|
235 ↗ | (On Diff #167382) | Above should be a 0x0c, 0xdb, 0x00, 0x54 not 0x0c, 0xdb, 0x00, 0x52 I didn't git add that change prior to my format-patch. |
test/ELF/hexagon-shared.s | ||
---|---|---|
2 ↗ | (On Diff #167382) | Though not strictly required, object files are better suffixed with .o and shared objects .so |
5 ↗ | (On Diff #167382) | This test may not be affected but some might (it happened in the past for a few times) When a t.so is used to link t. DT_SONAME of t.so will end up in the .dynstr section of t. Its length may change the section size sometimes. FileCheck on t may get different results on some systems. For intermediate %t3 here, it'd be better to specify -soname t3.so to fix the length of its DT_SONAME. |
test/ELF/hexagon-shared.s | ||
---|---|---|
5 ↗ | (On Diff #167382) |
Correction: DT_SONAME (if exists) or filename https://github.com/llvm-mirror/lld/tree/master/ELF/Driver.cpp#L232 // DSOs usually have DT_SONAME tags in their ELF headers, and the // sonames are used to identify DSOs. But if they are missing, // they are identified by filenames. We don't know whether the new // file has a DT_SONAME or not because we haven't parsed it yet. // Here, we set the default soname for the file because we might // need it later. // // If a file was specified by -lfoo, the directory part is not // significant, as a user did not specify it. This behavior is // compatible with GNU. %t is a temporary filename including a directory name, it may be of varying lengths. |