llvm-6502/lib/MC
Rafael Espindola 85f2ecc697 Sorry for such a large commit. The summary is that only MachO cares about the
actuall addresses in a .o file, so it is better to let the MachO writer compute
it.

This is good for two reasons. First, areas that shouldn't care about
addresses now don't have access to it. Second, the layout of each section
is independent. I should use this in a subsequent commit to speed it up.

Most of the patch is just removing the section address computation. The two
interesting parts are the change on how we handle padding in the end
of sections and how MachO can get the address of a-b when a and b are in
different sections.

Since now the expression evaluation normally doesn't know the section address,
it will think that a-b needs relocation and let the MachO writer know. Once
it has computed the section addresses, it calls back the expression evaluation
with the section addresses to resolve these expressions.

The remaining problem is the handling of padding. Currently it will create
a special alignment fragment at the end. Since that fragment doesn't update
the alignment of the section, it needs the real address to be computed.

Since now the layout will not compute a-b with a and b in different sections,
the only effect that the special alignment fragment has is update the
address size of the section. This can also be done by the MachO writer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121076 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 00:27:36 +00:00
..
MCDisassembler Merge System into Support. 2010-11-29 18:16:10 +00:00
MCParser Factor some code to parseSectionFlags and fix the default type of a section. 2010-11-25 15:32:56 +00:00
CMakeLists.txt MC-JIT: Stub out "pure" streamer. 2010-11-17 16:06:47 +00:00
ELFObjectWriter.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MachObjectWriter.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
Makefile start straightening out libedis's dependencies and make it fit 2010-07-20 18:25:19 +00:00
MCAsmInfo.cpp There are two reasons why we might want to use 2010-12-04 03:21:47 +00:00
MCAsmInfoCOFF.cpp Revert part of my last commit. the mingw32 build bot doesn't seem to like it. 2010-08-23 05:25:23 +00:00
MCAsmInfoDarwin.cpp Second try at making direct object emission produce the same results 2010-12-06 17:27:56 +00:00
MCAsmStreamer.cpp Second try at making direct object emission produce the same results 2010-12-06 17:27:56 +00:00
MCAssembler.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCCodeEmitter.cpp Define generic 1, 2 and 4 byte pc relative relocations. They are common 2010-11-28 14:17:56 +00:00
MCContext.cpp Rename temporary symbols if they conflict with artificial symbols created 2010-12-01 20:46:11 +00:00
MCDisassembler.cpp No newline at end of files. 2009-10-05 18:43:19 +00:00
MCDwarf.cpp Second try at making direct object emission produce the same results 2010-12-06 17:27:56 +00:00
MCELFStreamer.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCExpr.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCInst.cpp MC: Change MCInst::dump_pretty to not include a trailing newline. 2010-05-26 15:18:13 +00:00
MCInstPrinter.cpp add a new MCInstPrinter::getOpcodeName interface, when it is 2010-02-11 22:39:10 +00:00
MCLabel.cpp Added support in MC for Directional Local Labels. 2010-05-17 23:08:19 +00:00
MCLoggingStreamer.cpp There are two reasons why we might want to use 2010-12-04 03:21:47 +00:00
MCMachOStreamer.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCNullStreamer.cpp There are two reasons why we might want to use 2010-12-04 03:21:47 +00:00
MCObjectFormat.cpp Move the definition of this to the source file to anchor the vtable. 2010-10-19 00:37:30 +00:00
MCObjectStreamer.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCObjectWriter.cpp This is the last major patch to implement support for the .loc directive 2010-09-30 16:52:03 +00:00
MCPureStreamer.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCSection.cpp switch MCSectionCOFF from a syntactic to semantic representation, 2010-05-07 17:17:41 +00:00
MCSectionCOFF.cpp make isVirtualSection a virtual method on MCSection. Chris' suggestion. 2010-11-17 20:03:54 +00:00
MCSectionELF.cpp make isVirtualSection a virtual method on MCSection. Chris' suggestion. 2010-11-17 20:03:54 +00:00
MCSectionMachO.cpp make isVirtualSection a virtual method on MCSection. Chris' suggestion. 2010-11-17 20:03:54 +00:00
MCStreamer.cpp Second try at making direct object emission produce the same results 2010-12-06 17:27:56 +00:00
MCSymbol.cpp Change MCExpr::EvaluateAsRelocatableImpl of variables to return the original 2010-11-15 16:33:49 +00:00
MCValue.cpp MCValue: Change to holding MCSymbolRefExprs instead of MCSymbols, we will need this for accessing to symbol modifiers. 2010-03-18 00:59:10 +00:00
TargetAsmBackend.cpp Remove the unused TheTarget member. 2010-11-26 04:24:21 +00:00
WinCOFFObjectWriter.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
WinCOFFStreamer.cpp Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00