search for: image_rel_amd64_addr32

Displaying 3 results from an estimated 3 matches for "image_rel_amd64_addr32".

2020 Jan 21
2
MASM & RIP-relative addressing
...result as I do for llvm-mc, using the corresponding code: .data foo: .byte 5 .text .intel_syntax mov eax, foo Either way, LLVM emits an object file with disassembly (and relocation) as follows: 0: 8b 04 25 00 00 00 00 mov eax, dword ptr [0] 0000000000000003: IMAGE_REL_AMD64_ADDR32 foo To replicate the results from ml64.exe with LLVM, I instead need to use mov eax, [foo + rip] in place of mov eax, foo. At least when building with llvm-ml, we need to mimic ml.exe's approach; a reference to a symbol in another section should use the relative addressing mode. My fi...
2020 Jan 21
2
MASM & RIP-relative addressing
...result as I do for llvm-mc, using the corresponding code: .data foo: .byte 5 .text .intel_syntax mov eax, foo Either way, LLVM emits an object file with disassembly (and relocation) as follows: 0: 8b 04 25 00 00 00 00 mov eax, dword ptr [0] 0000000000000003: IMAGE_REL_AMD64_ADDR32 foo To replicate the results from ml64.exe with LLVM, I instead need to use mov eax, [foo + rip] in place of mov eax, foo. At least when building with llvm-ml, we need to mimic ml.exe's approach; a reference to a symbol in another section should use the relative addressing mode. My fi...
2020 Jan 21
2
MASM & RIP-relative addressing
Hi all, Continuing work on llvm-ml (a MASM assembler)... and my latest obstacle is in enabling MASM's convention that (unless specified) all memory location references should be RIP-relative. Without it, we emit the wrong instructions for "call", "jmp", etc., and anything we build fails at the linking stage. My best attempt at this so far is a small patch to