On Mar 18, 2007, at 7:05 PM, Chris Lattner wrote:> On Sun, 18 Mar 2007, Christopher Lamb wrote: >>> LLVM can currently produce .o files directly in some limited cases, >>> or you >>> can go through an assembler, which is much more robust. Any help >>> improving the direct ELF writer would be appreciated. >> >> Which of the LLVM tools can currently produce .o files directly >> without going through the platform's as/ld? How do I specify this on >> the command line to any of the tools? > > llc -filetype=obj > > I think that this is disabled for ELF, but you can easily enable it. > Macho works pretty well, but ELF is not entirely finished. Any > help would > be appreciated: basing the work on the macho writer would be > appropriate.So I've increased the support for ELF writing, but it's certainly not done yet. I fixed a few bugs that were preventing it from emitting correct elf headers, so if there are no ELF relocations emitted (i.e. the target can handle all of the relocations at code emission) then this change set should allow one to write a perfectly valid ELF REL file. I've got preliminary support for relocations, the data structures to be precise, and refactored some of the ELF writer to be more like the MachO writer. Should I try to submit a patch for the partial work that I've done? -- Christopher Lamb christopher.lamb at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070330/9df41e62/attachment.html>
On Mar 30, 2007, at 12:35 PM, Christopher Lamb wrote:> > On Mar 18, 2007, at 7:05 PM, Chris Lattner wrote: > >> On Sun, 18 Mar 2007, Christopher Lamb wrote: >>>> LLVM can currently produce .o files directly in some limited cases, >>>> or you >>>> can go through an assembler, which is much more robust. Any help >>>> improving the direct ELF writer would be appreciated. >>> >>> Which of the LLVM tools can currently produce .o files directly >>> without going through the platform's as/ld? How do I specify this on >>> the command line to any of the tools? >> >> llc -filetype=obj >> >> I think that this is disabled for ELF, but you can easily enable it. >> Macho works pretty well, but ELF is not entirely finished. Any >> help would >> be appreciated: basing the work on the macho writer would be >> appropriate. > > So I've increased the support for ELF writing, but it's certainly > not done yet. I fixed a few bugs that were preventing it from > emitting correct elf headers, so if there are no ELF relocations > emitted (i.e. the target can handle all of the relocations at code > emission) then this change set should allow one to write a > perfectly valid ELF REL file. > > I've got preliminary support for relocations, the data structures > to be precise, and refactored some of the ELF writer to be more > like the MachO writer. > > Should I try to submit a patch for the partial work that I've done?Should a PR be opened for ELF output? -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070330/28dcdd1a/attachment.html>
On Fri, 30 Mar 2007, Christopher Lamb wrote:> So I've increased the support for ELF writing, but it's certainly not done > yet. I fixed a few bugs that were preventing it from emitting correct elf > headers, so if there are no ELF relocations emitted (i.e. the target can > handle all of the relocations at code emission) then this change set should > allow one to write a perfectly valid ELF REL file.Nice!> Should I try to submit a patch for the partial work that I've done?Absolutely. -Chris -- http://nondot.org/sabre/ http://llvm.org/
On Fri, 30 Mar 2007, Christopher Lamb wrote:>> Should I try to submit a patch for the partial work that I've done? > > Should a PR be opened for ELF output?Sure, that would be a good way to track the feature. Patches should be sent to llvm-commits. -Chris -- http://nondot.org/sabre/ http://llvm.org/