[llvm-commits] [PATCH] Support configuration machine type in ELFObjectWriter
Wesley Peck
peckw at wesleypeck.com
Thu Oct 21 14:20:57 PDT 2010
I've been working on ELF object support for the MicroBlaze backend and found that ELFObjectWriter assumes the x86/x86-64 architecture. Attached is a patch that makes the 16-bit e_machine value in the ELF header configurable by the target backend.
Right now the target backend simply passes the 16-bit value that it would like to use in the ELF header. I considered a second approach where ArchType would be passed to ELFObjectWriter and decoded into the correct 16-bit value. The way I see it is that this has the advantage of being similar to the way OSType is currently handled by ELFObjectWriter but has the disadvantage of requiring backends to edit the ELFObjectWriter file if they want to add ELF support.
--
Wesley Peck
University of Kansas
SLDG Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101021/2f765878/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elf-emachine.patch
Type: application/octet-stream
Size: 5470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101021/2f765878/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101021/2f765878/attachment-0001.html>
More information about the llvm-commits
mailing list