[PATCH] D37556: [ARC] Prepare the implementation of relocation for lld
Leslie Zhai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 02:32:05 PDT 2017
xiangzhai created this revision.
Hi LLVM developers,
Prepare the implementation of ARC target ELF relocation for lld, so at present it needs ARC GNU toolchain <https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain> to generate ELF object:
$ cat arc-hello.s
main:
bl memset
bl strncpy
bl puts
$ /opt/arc-gnu/bin/arc-elf32-gcc -mcpu=arc600 -o arc-hello.o -c arc-hello.s
Relocation:
$ /opt/arc-gnu/bin/arc-elf32-readelf -r arc-hello.o
Relocation section '.rela.text' at offset 0x108 contains 3 entries:
Offset Info Type Sym.Value Sym. Name + Addend
00000000 00000611 R_ARC_S25W_PCREL 00000000 memset + 0
00000004 00000711 R_ARC_S25W_PCREL 00000000 strncpy + 0
00000008 00000811 R_ARC_S25W_PCREL 00000000 puts + 0
LLD:
$ /opt/llvm-svn/bin/ld.lld -o arc-hello-lld arc-hello.o -L/opt/arc-gnu/lib/gcc/arc-elf32/7.1.1/arc600 -L/opt/arc-gnu/lib/gcc/arc-elf32/7.1.1/../../../../arc-elf32/lib/arc600 -L/opt/arc-gnu/lib/gcc/arc-elf32/7.1.1 -L/opt/arc-gnu/lib/gcc/arc-elf32/7.1.1/../../../../arc-elf32/lib --start-group -lgcc -lc -lnosys --end-group -Ttext=0
Please review it, thanks a lot!
Regards,
Leslie Zhai
Repository:
rL LLVM
https://reviews.llvm.org/D37556
Files:
include/llvm/BinaryFormat/ELF.h
include/llvm/BinaryFormat/ELFRelocs/ARC.def
include/llvm/module.modulemap
lib/Object/ELF.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37556.114132.patch
Type: text/x-patch
Size: 4671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170907/9b136df7/attachment-0001.bin>
More information about the llvm-commits
mailing list