llvm-6502/include/llvm
Rafael Espindola cef81b37c7 Add a function to get the segment name of a section.
On MachO, sections also have segment names. When a tool looking at a .o file
prints a segment name, this is what they mean. In reality, a .o has only one
anonymous, segment.

This patch adds a MachO only function to fetch that segment name. I named it
getSectionFinalSegmentName since the main use for the name seems to be inform
the linker with segment this section should go to.

The patch also changes MachOObjectFile::getSectionName to return just the
section name instead of computing SegmentName,SectionName.

The main difference from the previous patch is that it doesn't use
InMemoryStruct. It is extremely dangerous: if the endians match it returns
a pointer to the file buffer, if not, it returns a pointer to an internal buffer
that is overwritten in the next API call.

We should change all of this code to use
support::detail::packed_endian_specific_integral like ELF, but since these
functions only handle strings, they work with big and little endian machines
as is.

I have tested this by installing ubuntu 12.10 ppc on qemu, that is why it took
so long :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170838 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-21 03:47:03 +00:00
..
ADT Don't leave IsUnsigned uninitialized in a default-constructed APSInt. Copying 2012-12-20 03:59:24 +00:00
Analysis Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call. 2012-12-20 16:04:27 +00:00
Assembly
Bitcode Have the bitcode reader/writer just use FPMathOperator's fast math enum directly 2012-12-09 20:23:16 +00:00
CodeGen Add targets to skip running the GC passes. 2012-12-21 02:57:04 +00:00
Config [CMake] Move libxml2 stuff from clang to llvm/cmake. 2012-12-14 18:30:20 +00:00
DebugInfo Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ExecutionEngine JITEventListener.h: Use llvm-config.h instead of config.h. 2012-12-13 15:03:38 +00:00
MC Aligned bundling support. Following the discussion here: 2012-12-20 19:05:53 +00:00
Object Add a function to get the segment name of a section. 2012-12-21 03:47:03 +00:00
Option Copy clang/Driver/<Option parsing stuff> to llvm. 2012-12-05 00:29:32 +00:00
Support Remove MCTargetAsmLexer and its derived classes now that edis, 2012-12-20 14:43:30 +00:00
TableGen Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Target Move isSubRegister() and isSuperRegister to MCRegisterInfo. 2012-12-19 23:38:46 +00:00
Transforms [msan] Add track-origins argument to the pass constructor. 2012-12-19 13:55:51 +00:00
AddressingMode.h
Argument.h Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future. 2012-12-19 07:18:57 +00:00
Attributes.h Some random comment, naming, and format changes. 2012-12-20 21:28:43 +00:00
AutoUpgrade.h
BasicBlock.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
CallGraphSCCPass.h moves doInitialization and doFinalization to the Pass class and removes some unreachable code in MachineModuleInfo 2012-12-03 21:56:57 +00:00
CallingConv.h Add the Erlang/HiPE calling convention, patch by Yiannis Tsiouris. 2012-11-16 12:36:39 +00:00
CMakeLists.txt
Constant.h Make GlobalOpt be conservative with TLS variables (PR14309) 2012-11-15 11:40:00 +00:00
Constants.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
DataLayout.h Don't use -1 as a value of an unsigned 7-bit enumeration; that has undefined 2012-12-20 04:02:58 +00:00
DebugInfo.h Improve debug info generated with enabled AddressSanitizer. 2012-12-12 14:31:53 +00:00
DefaultPasses.h
DerivedTypes.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
DIBuilder.h Use the 'count' attribute to calculate the upper bound of an array. 2012-12-04 21:34:03 +00:00
Function.h Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call. 2012-12-20 16:04:27 +00:00
GlobalAlias.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
GlobalValue.h
GlobalVariable.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
GVMaterializer.h
InitializePasses.h Initial commit of MemorySanitizer. 2012-11-29 09:57:20 +00:00
InlineAsm.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
InstrTypes.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Instruction.def
Instruction.h Reorganize FastMathFlags to be a wrapper around unsigned, and streamline some interfaces. 2012-12-09 21:12:04 +00:00
Instructions.h Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call. 2012-12-20 16:04:27 +00:00
InstVisitor.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
IntrinsicInst.h Refactor isIntrinsic() to be quicker, and change classof() (and thus, isa<IntrinsicInst>()) to use it. This decreases the number of occurrences of the slow-path string matching performed by getIntrinsicID(). 2012-12-19 23:17:20 +00:00
Intrinsics.h s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future. 2012-12-07 23:16:57 +00:00
Intrinsics.td Add R600 backend 2012-12-11 21:25:42 +00:00
IntrinsicsARM.td Revert "Adding support for llvm.arm.neon.vaddl[su].* and" 2012-12-20 21:09:38 +00:00
IntrinsicsHexagon.td
IntrinsicsMips.td
IntrinsicsNVVM.td
IntrinsicsPowerPC.td
IntrinsicsR600.td Add R600 backend 2012-12-11 21:25:42 +00:00
IntrinsicsX86.td Add support of RTM from TSX extension 2012-11-08 07:28:54 +00:00
IntrinsicsXCore.td
IRBuilder.h Fix typo that results in new landing pads not getting a name, fixing PR14617. 2012-12-17 12:02:36 +00:00
LinkAllPasses.h LoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase the function size. 2012-12-12 19:29:45 +00:00
LinkAllVMCore.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Linker.h
LLVMContext.h
MDBuilder.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Metadata.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
Module.h s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future. 2012-12-07 23:16:57 +00:00
OperandTraits.h
Operator.h Holding my nose and moving the accumulation routine to GEPOperator 2012-12-11 11:05:15 +00:00
Pass.h moves doInitialization and doFinalization to the Pass class and removes some unreachable code in MachineModuleInfo 2012-12-03 21:56:57 +00:00
PassAnalysisSupport.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
PassManager.h One more step towards making doInitialization and doFinalization useful for 2012-11-29 17:47:05 +00:00
PassManagers.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
PassRegistry.h
PassSupport.h Fix comment typo. 2012-12-17 11:43:15 +00:00
SymbolTableListTraits.h
TargetTransformInfo.h Replace TargetLowering::isIntImmLegal() with 2012-12-11 23:26:14 +00:00
Type.h
TypeBuilder.h
TypeFinder.h
Use.h
User.h
Value.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ValueSymbolTable.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00