aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
authorPeter Smith <peter.smith@arm.com>2025-06-20 10:11:42 +0100
committerGitHub <noreply@github.com>2025-06-20 10:11:42 +0100
commiteb0f1dc00e5d0e591fe912c1aaf9dd9d01d94b8d (patch)
tree7d37f4ed5b40890a4d181975460ad787096c6c8a /llvm/lib/CodeGen/MachineBlockPlacement.cpp
parentb85387dfe8e67ee8a142a1faf25325761c343577 (diff)
downloadllvm-eb0f1dc00e5d0e591fe912c1aaf9dd9d01d94b8d.zip
llvm-eb0f1dc00e5d0e591fe912c1aaf9dd9d01d94b8d.tar.gz
llvm-eb0f1dc00e5d0e591fe912c1aaf9dd9d01d94b8d.tar.bz2
[LLD][ELF] Include offset when adding Thunk symbols (#144995)
Include the offset of a thunk in the ThunkSection when adding symbols. At Thunk creation time the offset is set to 0 as we don't know where in the ThunkSection the Thunk will end up. The symbol values are updated by the setOffset() call in assignOffsets(). When we transform a thunk from a short to a long, we sometimes add a mapping symbol. At this point the offset of the thunk is non zero and we need to account for that when defining the symbol, as the setOffset() call subtracts the offset before adding the new one back in. To test; added a second thunk that is converted to a long thunk to aarch64-thunk-bit-multipass. This second thunk is given a non zero offset from the start of the Thunk Section so we can observe the mapping symbol being put in the wrong place without accounting for the offset. fixes: https://github.com/llvm/llvm-project/issues/142326
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
0 files changed, 0 insertions, 0 deletions