summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.h
Commit message (Collapse)AuthorAgeFilesLines
* Introduce adjustFixupOffset that adjusts the fixup offset of a relocation.Roman Divacky2011-08-041-0/+2
| | | | | | | | This is meant to be overriden by backends. Implement an override on PowerPC which adjusts the offset by 2 for ha16/lo16 relocation kinds. This removes a commented out hack and enables hello world to be compiled on PowerPC. llvm-svn: 136905
* Sketch out PowerPC ELF writer. This is enough to get clang -integrated-asRoman Divacky2011-08-021-0/+15
| | | | | | to compile a working hello world on FreeBSD/PPC32. llvm-svn: 136689
* Address the last bit of relocation flag related divergence betweeenJason W Kim2011-05-111-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM and binutils. With this patch, there are no functional differences between the .o produced directly from LLVM versus the .s to .o via GNU as, for relocation tags at least, for both PIC and non-PIC modes. Because some non-PIC reloc tags are used (legally) on PIC, so IsPCRel flag is necessary but not sufficient to determine whether the overall codegen mode is PIC or not. Why is this necessary? There is an incompatibility of how relocs are emitted in the .rodata section. Binutils PIC likes to emit certain relocs as section relative offsets. Non-PIC does not do this. So I added a hidden switch on the ELFObjectwriter "-arm-elf-force-pic" which forces the objectwriter to pretend that all relocs are for PIC mode. Todo: Activate ForceARMElfPIC to true if -relocation-model=pic is selected on llc. Todo: There are probably more issues for PIC mode on ARM/MC/ELF... Todo: Existing tests in MC/ARM/elf-reloc*.ll need to be converted over to .s tests as well as expanded to cover the gamut. llvm-svn: 131205
* Write the section table and the section data in the same order thatRafael Espindola2011-03-201-14/+29
| | | | | | | gun as does. This makes it a lot easier to compare the output of both as the addresses are now a lot closer. llvm-svn: 127972
* Split MCEELFStreamer and ELFObjectWriter into .h and .cpp files, so that ↵Jan Sjödin2011-03-031-0/+391
other components can use them. llvm-svn: 126942
OpenPOWER on IntegriCloud