llvm-6502/include/llvm/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
..
MCParser Merge System into Support. 2010-11-29 18:16:10 +00:00
EDInstInfo.h Merge System into Support. 2010-11-29 18:16:10 +00:00
MCAsmInfo.h There are two reasons why we might want to use 2010-12-04 03:21:47 +00:00
MCAsmInfoCOFF.h revert 93934, removing the MCAsmInfo endianness bit. I can't 2010-01-20 06:34:14 +00:00
MCAsmInfoDarwin.h revert 93934, removing the MCAsmInfo endianness bit. I can't 2010-01-20 06:34:14 +00:00
MCAsmLayout.h Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCAssembler.h Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCCodeEmitter.h Comment grammar tweakage. 2010-10-12 18:11:41 +00:00
MCContext.h It may not be an option to skip .debug_line if there are file reference in already emitted debug info. So, for now, emit dummy line table entry to make older linker and assemblers happy. This is not a new behavior, original AsmPrinter emitted similar line table entries. 2010-12-03 00:10:48 +00:00
MCDirectives.h Added support for the Mach-O .symbol_resolver directive. rdar://8673046 2010-11-19 18:39:33 +00:00
MCDisassembler.h Merge System into Support. 2010-11-29 18:16:10 +00:00
MCDwarf.h Remember the contents of leb and dwarfline fragments when relaxing. This avoids 2010-12-04 21:58:52 +00:00
MCELFSymbolFlags.h Implement .weakref. 2010-11-01 14:28:48 +00:00
MCExpr.h Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCFixup.h Merge System into Support. 2010-11-29 18:16:10 +00:00
MCInst.h Merge System into Support. 2010-11-29 18:16:10 +00:00
MCInstPrinter.h trailing whitespace 2010-09-17 21:23:56 +00:00
MCLabel.h Added support in MC for Directional Local Labels. 2010-05-17 23:08:19 +00:00
MCMachOSymbolFlags.h Added support for the Mach-O .symbol_resolver directive. rdar://8673046 2010-11-19 18:39:33 +00:00
MCObjectFormat.h Move the definition of this to the source file to anchor the vtable. 2010-10-19 00:37:30 +00:00
MCObjectStreamer.h Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCObjectWriter.h Sorry for such a large commit. The summary is that only MachO cares about the 2010-12-07 00:27:36 +00:00
MCSection.h make isVirtualSection a virtual method on MCSection. Chris' suggestion. 2010-11-17 20:03:54 +00:00
MCSectionCOFF.h make isVirtualSection a virtual method on MCSection. Chris' suggestion. 2010-11-17 20:03:54 +00:00
MCSectionELF.h make isVirtualSection a virtual method on MCSection. Chris' suggestion. 2010-11-17 20:03:54 +00:00
MCSectionMachO.h make isVirtualSection a virtual method on MCSection. Chris' suggestion. 2010-11-17 20:03:54 +00:00
MCStreamer.h Second try at making direct object emission produce the same results 2010-12-06 17:27:56 +00:00
MCSymbol.h Change MCExpr::EvaluateAsRelocatableImpl of variables to return the original 2010-11-15 16:33:49 +00:00
MCValue.h Merge System into Support. 2010-11-29 18:16:10 +00:00
SectionKind.h Trailing whitespace. 2010-07-01 01:00:22 +00:00