search for: addr_of_section

Displaying 2 results from an estimated 2 matches for "addr_of_section".

2014 Jun 09
4
[LLVMdev] MachO non-external X86_64_RELOC_UNSIGNED
...NSIGNED relocation type. When r_extern=1, the semantics seem pretty clear: Let x be a pointer to r_offset of appropriate size given by r_size, then *x += addr_of_symbol(r_symbolnum) However, when r_extern=0 the correct behavior is not clear. By analogy with the above, I would have expected *x += addr_of_section(r_symbolnum) but what LLVM implements is different. In RTDyld it implements *x = (*x-addr_of_section(r_symbolnum)) + addr_of_section(r_symbolnum) or equivalently *x = *x i.e. a noop. This works because llvm codegen also emits the absolute value of the address. I am unsure what is intended and...
2014 Jun 10
4
[LLVMdev] MachO non-external X86_64_RELOC_UNSIGNED
...r: > > > > Let x be a pointer to r_offset of appropriate size given by r_size, then > > *x += addr_of_symbol(r_symbolnum) > > > > However, when r_extern=0 the correct behavior is not clear. By analogy > with the above, I would have expected > > > > *x += addr_of_section(r_symbolnum) > > > > but what LLVM implements is different. In RTDyld it implements > > > > *x = (*x-addr_of_section(r_symbolnum)) + addr_of_section(r_symbolnum) > > > > or equivalently > > > > *x = *x > In ld64 relocations are parsed into “Fixups”...