<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>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.</div><div><br></div><div>Right now the target backend simply passes the 16-bit value that it would like to use in the ELF header. I have considered a second approach where ArchType would be passed to ELFObjectWriter and decoded into the correct 16-bit value. The way I see, the second approach 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 source file if they want to add ELF support. I suppose that this is no different from editing ADT/Triple.h when you want to add a new ArchType.</div><div><br></div><div>If the second approach is more desirable, then I can rework the patch as appropriate.</div><div><br></div><div><br></div></body></html>