Add support for macho relocations. (#378)
This requires splitting X86PCRel4 into two separate relocations, to distinguish the case where the instruction is a call, as Mach-O uses a different relocation in that case. This also makes it explicit that only x86-64 relocations are supported currently.
This commit is contained in:
@@ -485,7 +485,7 @@ ebb0:
|
||||
; Colocated functions.
|
||||
|
||||
; asm: call bar
|
||||
call fn1() ; bin: stk_ovf e8 PCRel4(%bar-4) 00000000
|
||||
call fn1() ; bin: stk_ovf e8 CallPCRel4(%bar-4) 00000000
|
||||
|
||||
; asm: lea 0x0(%rip), %rcx
|
||||
[-,%rcx] v400 = func_addr.i64 fn1 ; bin: 48 8d 0d PCRel4(%bar-4) 00000000
|
||||
|
||||
Reference in New Issue
Block a user