[llvm-commits] LLD: patch WriterELF patch

Hemant Kulkarni khemant at codeaurora.org
Tue Sep 4 12:30:08 PDT 2012


This patch adds ELF Writer basic infrastructure. It is based off of Mach-O
writer in lld tree. Some of the comments are a little verbose, they might
become irrelevant in future when they will be removed.

ELFHeaderChunk is the class that sets the correct fields in Elf_Hdr
structure.
SectionChunk class is container for each section that will be in writer
output
ELFStringSectionChunk implements the string section as per SCO SYS V ABI 
ELFSectionHeaderChunk is container to work with SectionChunk and other
custom sections made by linker to create a table of Elf_Shdr structures.

Issues:
Symbol tables are not yet implemented; I will put in a new patch for symbol
table update. This might also involve modifying ReaderELF and deal with
TODO/FIXME in it.
Relocation fixups are not implemented yet. 
The test infrastructure for LLD will need to be modified to read binary
files and test writer. I will add them so we can test Writer in make check
like test. For now, I run a modified lld-core utility that has options to
choose writer and I emit ELF binary. I then examine the file with readelf.



--
Hemant Kulkarni
khemant at codeaurora.org
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
the Linux Foundation


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReaderWriter.patch
Type: application/octet-stream
Size: 60527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120904/25bfad76/attachment.obj>


More information about the llvm-commits mailing list