llvm-6502/lib/MC
Jason W Kim e964d1192a Address the last bit of relocation flag related divergence betweeen
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131205 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11 22:53:06 +00:00
..
MCDisassembler Give MC/MCDisassembler/Disassembler.h a header guard. 2011-04-24 15:46:56 +00:00
MCParser Parsing and plumbing for .cfi_sections. 2011-05-10 01:10:18 +00:00
CMakeLists.txt
ELFObjectWriter.cpp Address the last bit of relocation flag related divergence betweeen 2011-05-11 22:53:06 +00:00
ELFObjectWriter.h Address the last bit of relocation flag related divergence betweeen 2011-05-11 22:53:06 +00:00
MachObjectWriter.cpp MC/Mach-O: Update getSymbolAddress() to support evaluation of variables. 2011-04-29 18:13:42 +00:00
Makefile
MCAsmInfo.cpp Rename DwarfRequiresRelocationForStmtList to 2011-05-10 20:35:05 +00:00
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp Rename DwarfRequiresRelocationForStmtList to 2011-05-10 20:35:05 +00:00
MCAsmStreamer.cpp Add CFIStartSections to the asm printer. Add an assert that at least 2011-05-10 13:39:48 +00:00
MCAssembler.cpp Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with 2011-05-08 14:35:21 +00:00
MCCodeEmitter.cpp
MCContext.cpp Make the StringMaps attached to MCContext use the MCContext's allocator; 2011-04-18 05:02:31 +00:00
MCDisassembler.cpp
MCDwarf.cpp Avoid a gcc warning. 2011-05-10 22:28:35 +00:00
MCELF.cpp
MCELF.h
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp Factor some code into a new EmitFrames method. 2011-05-10 03:14:15 +00:00
MCELFStreamer.h Add constructors to MCElfStreamer and MCObjectStreamer to take an extra MCAssembler * argument. 2011-03-09 17:33:05 +00:00
MCExpr.cpp MCExpr: Add FindAssociatedSection, which attempts to mirror the 'as' semantics 2011-04-29 18:00:03 +00:00
MCInst.cpp
MCInstPrinter.cpp Preliminary support for ARM frame save directives emission via MI flags. 2011-03-05 18:43:32 +00:00
MCLabel.cpp
MCLoggingStreamer.cpp Simplify the handling of pcrel relocations on ELF. Now we do the right thing 2011-05-01 03:50:49 +00:00
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Factor some code into a new EmitFrames method. 2011-05-10 03:14:15 +00:00
MCNullStreamer.cpp Simplify the handling of pcrel relocations on ELF. Now we do the right thing 2011-05-01 03:50:49 +00:00
MCObjectStreamer.cpp Simplify the handling of pcrel relocations on ELF. Now we do the right thing 2011-05-01 03:50:49 +00:00
MCObjectWriter.cpp
MCPureStreamer.cpp
MCSection.cpp
MCSectionCOFF.cpp
MCSectionELF.cpp Be nice to Xcore and the XMOS assembler and avoid quoting section names 2011-03-04 20:03:14 +00:00
MCSectionMachO.cpp Reapply 127939 since Daniel fixed the breakage. <rdar://problem/9012638> 2011-03-19 02:42:31 +00:00
MCStreamer.cpp Add CFIStartSections to the asm printer. Add an assert that at least 2011-05-10 13:39:48 +00:00
MCSymbol.cpp MC: Change variable symbols to be recognized as defined, by assigning their sections based on FindAssociatedSection(). 2011-04-29 18:20:17 +00:00
MCValue.cpp
TargetAsmBackend.cpp
WinCOFFObjectWriter.cpp Fix relative relocations. This is sufficient for running the rust testsuite with 2011-04-21 18:36:50 +00:00
WinCOFFStreamer.cpp