[PATCH] Implement some missing relocs for X86_64

Rafael Auler rafaelauler at gmail.com
Wed Nov 12 14:26:47 PST 2014


Hi Davide,

Thanks for submitting your work. In LLD, we use the LLVM LIT test framework. To read more about it, visit http://llvm.org/docs/CommandGuide/lit.html. To see how this is used in the context of LLD, check the folder lld/test/elf. Each file in this folder is a different test. Start reading those files to get the hang of it.

As a general rule, avoid uploading binary files as part of tests. I know this is hard to do when testing a linker, because its inputs are binary files, but you can avoid this with some clever LLVM tools called obj2yaml and yaml2obj. These tools convert back and forth between binary files (including ELF) and a YAML description. Therefore, write your inputs in YAML then use yaml2obj to create the binary input, then ask lld to process it and see whether your relocations get resolved by converting the output to text again via obj2yaml.

http://reviews.llvm.org/D6235






More information about the llvm-commits mailing list