llvm-6502/lib
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
..
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
Archive Sort includes for all of the .h files under the 'lib' tree. These were 2012-12-04 07:12:27 +00:00
AsmParser 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
Bitcode 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
CodeGen Add targets to skip running the GC passes. 2012-12-21 02:57:04 +00:00
DebugInfo 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
ExecutionEngine Query section for whether it should be executable. 2012-12-17 17:59:35 +00:00
Linker Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
MC Fix an unitialized member variable that may have caused sporadic failures 2012-12-20 22:51:52 +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 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
TableGen Sort includes for all of the .h files under the 'lib' tree. These were 2012-12-04 07:12:27 +00:00
Target Improve the X86 cost model for loads and stores. 2012-12-21 01:33:59 +00:00
Transforms Every pass deserves a name, even codegenprep. 2012-12-21 01:48:14 +00:00
VMCore Some random comment, naming, and format changes. 2012-12-20 21:28:43 +00:00
CMakeLists.txt Copy clang/Driver/<Option parsing stuff> to llvm. 2012-12-05 00:29:32 +00:00
LLVMBuild.txt Copy clang/Driver/<Option parsing stuff> to llvm. 2012-12-05 00:29:32 +00:00
Makefile Copy clang/Driver/<Option parsing stuff> to llvm. 2012-12-05 00:29:32 +00:00