llvm.org GIT mirror llvm / 0cb3910
ExecutionEngine: add R_AARCH64_ABS{16,32} Add support for the R_AARCH64_ABS{16,32} relocations in the execution engine. This is primarily used for DWARF debug information relocations and needed by the LLVM JIT to support JITing for lldb. Patch by Alex Langford! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313654 91177308-0d34-0410-b5e6-96231b3b80d8 Saleem Abdulrasool 3 years ago
2 changed file(s) with 25 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
353353 default:
354354 llvm_unreachable("Relocation type not implemented yet!");
355355 break;
356 case ELF::R_AARCH64_ABS16: {
357 uint64_t Result = Value + Addend;
358 assert(static_cast(Result) >= INT16_MIN && Result < UINT16_MAX);
359 write(isBE, TargetPtr, static_cast(Result & 0xffffU));
360 break;
361 }
362 case ELF::R_AARCH64_ABS32: {
363 uint64_t Result = Value + Addend;
364 assert(static_cast(Result) >= INT32_MIN && Result < UINT32_MAX);
365 write(isBE, TargetPtr, static_cast(Result & 0xffffffffU));
366 break;
367 }
356368 case ELF::R_AARCH64_ABS64:
357369 write(isBE, TargetPtr, Value + Addend);
358370 break;
8181 ## f & 0xFFF = 0xdef (bits 11:0 of f)
8282 ## 0xdef << 10 = 0x37bc00
8383 # rtdyld-check: *{4}(a) = 0x9137bc00
84
85 .data
86 laser:
87 .asciz "laser"
88 ABS16:
89 .short laser
90 # rtdyld-check: (*{2}ABS16) = laser[15:0]
91 ABS32:
92 .long laser
93 # rtdyld-check: (*{4}ABS32) = laser[31:0]
94 ABS64:
95 .xword laser
96 # rtdyld-check: (*{8}ABS64) = laser