[lld] [LLD][COFF] Implement ARM64X relocations for the exception table (PR #123723)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 03:28:39 PST 2025
================
@@ -1230,6 +1230,16 @@ void DynamicRelocsChunk::finalize() {
size = alignTo(size, sizeof(uint32_t));
}
+// Set the reloc value. The reloc entry must be allocated beforehand.
+void DynamicRelocsChunk::set(uint32_t rva, Arm64XRelocVal value) {
+ Arm64XDynamicRelocEntry &entry =
+ *llvm::find_if(arm64xRelocs, [rva](const Arm64XDynamicRelocEntry &e) {
----------------
mstorsjo wrote:
I guess this assumes that this does find an entry. If it doesn't, does it trigger UB or something else - can we receive the returned iterator(?) and check it with an assert, before dereferencing it?
https://github.com/llvm/llvm-project/pull/123723
More information about the llvm-commits
mailing list