[llvm-dev] Need help implementing relocations
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Wed Mar 13 08:49:12 PDT 2019
On Wed, 13 Mar 2019 at 15:14, Josh Sharp <mm92126 at hotmail.com> wrote:
> "it tells the linker to insert the address of
> date when converting this .o file into a final executable."
>
> Which utility do you use to convert .o to .elf and insert the address of 'date'? llvm-objcopy?
The linker in the LLVM project is called "lld". It's pretty good for
ELF, but you'll have to implement the parts for your target
(specifically exactly how R_XXX_MOVI does its job in this case).
Alternatively, if your platform already has GCC support you can use ld
from GNU binutils, but you'll probably have to cross-compile it
yourself.
Cheers.
Tim.
More information about the llvm-dev
mailing list