History log of /external/llvm/include/llvm/Object/MachO.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/include/llvm/Object/MachO.h
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/include/llvm/Object/MachO.h
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/include/llvm/Object/MachO.h
bc884fd9f7bdb64d250be639edc8dc85a20a1975 02-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> move getSymbolNMTypeChar to the one program that needs it: nm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
29552222c2e7cbeb37fcd15d247597467f7b8544 27-Sep-2013 Rui Ueyama <ruiu@google.com> Object/COFF: Rename getXXX{Begin,End} -> xxx_{begin,end}.

It is mentioned in the LLVM coding standard that _begin() and _end() suffixes
should be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
5510728d28bb1ee04abc32da3d21b7df12948053 01-Sep-2013 Charles Davis <cdavis5x@gmail.com> Move everything depending on Object/MachOFormat.h over to Support/MachO.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
f69a29b23a116a3520f185054290c445abf9aa62 27-Aug-2013 Charles Davis <cdavis5x@gmail.com> Revert "Fix the build broken by r189315." and "Move everything depending on Object/MachOFormat.h over to Support/MachO.h."

This reverts commits r189319 and r189315. r189315 broke some tests on what I
believe are big-endian platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
9c3dd1b0d1e96ef408b68da3b06c6ebd6c943601 27-Aug-2013 Charles Davis <cdavis5x@gmail.com> Move everything depending on Object/MachOFormat.h over to Support/MachO.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
0856d3d9712c9fc515f014102e9f03f389555e75 21-Aug-2013 Jakub Staszak <kubastaszak@gmail.com> Move #includes from .h to .cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
9c22f87b1374b06dc6c07f6e8047890e390bbe2d 18-Jun-2013 Alexey Samsonov <samsonov@google.com> Basic support for parsing Mach-O universal binaries in LLVMObject library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
54154f3bf1ae3d2dfd68cc9474cad061b3338a40 06-Jun-2013 Kevin Enderby <enderby@apple.com> Teach llvm-objdump with the -macho parser how to use the data in code table
from the LC_DATA_IN_CODE load command. And when disassembling print
the data in code formatted for the kind of data it and not disassemble those
bytes.

I added the format specific functionality to the derived class MachOObjectFile
since these tables only appears in Mach-O object files. This is my first
attempt to modify the libObject stuff so if folks have better suggestions
how to fit this in or suggestions on the implementation please let me know.

rdar://11791371


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
6c1202c459ffa6d693ad92fa84e43902bc780bca 05-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Handle relocations that don't point to symbols.

In ELF (as in MachO), not all relocations point to symbols. Represent this
properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj
ELF's dumper to handle relocatios without symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
167957fa095bc7200b908e6e142be3e604bcfeea 09-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Change getRelocationAdditionalInfo to be ELF only.

It was only implemented for ELF where it collected the Addend, so this
patch also renames it to getRelocationAddend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
e87dadc44b1544c35e13cf48dfe167109929a944 30-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix Addend computation for non external relocations on Macho.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
59a0e79631ed851d98cf9c2ba6fa5f9aafdfdc93 30-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add getSymbolAlignment to the ObjectFile interface.

For regular object files this is only meaningful for common symbols. An object
file format with direct support for atoms should be able to provide alignment
information for all symbols.

This replaces getCommonSymbolAlignment and fixes
test-common-symbols-alignment.ll on darwin. This also includes a fix to
MachOObjectFile::getSymbolFlags. It was marking undefined symbols as common
(already tested by existing mcjit tests now that it is used).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
2173e1839c2d00f7f980450dd537047b7b376e6b 26-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Use llvm/Object/MachO.h in macho-dumper. Drop the old macho parser.

For Mach-O there were 2 implementations for parsing object files. A
standalone llvm/Object/MachOObject.h and llvm/Object/MachO.h which
implements the generic interface in llvm/Object/ObjectFile.h.

This patch adds the missing features to MachO.h, moves macho-dump to
use MachO.h and removes ObjectFile.h.

In addition to making sure that check-all is clean, I checked that the
new version produces exactly the same output in all Mach-O files in a
llvm+clang build directory (including executables and shared
libraries).

To test the performance, I ran macho-dump over all the files in a
llvm+clang build directory again, but this time redirecting the output
to /dev/null. Both the old and new versions take about 4.6 seconds
(2.5 user) to finish.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
8d8ac09bfba6686bbed262c764502ae3de626ad4 22-Apr-2013 Eric Christopher <echristo@gmail.com> Add the same todo about a command iterator interface into the
other mach-o object file as well.

TODO: One interface to rule them all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
fd7aa38e304a09fa0ef51b85b773b649b7e58c5e 18-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> At Jim Grosbach's request detemplate Object/MachO.h.

We are still able to handle mixed endian objects by swapping one struct at a
time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
c7f424d338754836906833b69da1ca56843feb71 15-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove getters now that we can specialize structs on the host endianness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
107cd0caa9c1250a86d31983b808b99e5b7d1d10 13-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add typenames to see if bot goes green.

I hope this brings http://lab.llvm.org:8011/builders/clang-x86_64-darwin11-self-mingw32 back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
69893a224da22cff2ef37b68f8e28c3459679837 13-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Some versions of gcc don't like typenames in these places.

Should fix the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
da2a2372c6ae715befae7f086afe769dd80814f3 13-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Finish templating MachObjectFile over endianness.

We are now able to handle big endian macho files in llvm-readobject. Thanks to
David Fang for providing the object files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
e292347503cd7598429c08f9984ab3e0a44ab8a3 12-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add 179294 back, but don't use bit fields so that it works on big endian hosts.

Original message:

Print more information about relocations.

With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
59a8b5a8f09ae4c4f3b0e3d8025c6b4cf3ca1f1a 11-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert my last two commits while I debug what is wrong in a big endian host.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
6b281800d2bd2419d3f1c4e282c7c07dd54058f5 11-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix llvm-readobj tests on big endian hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
4edf092787cab37d46da96eb1e9df0677ca30b1d 11-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Print more information about relocations.

With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
8bf80061ba44af16b4597627ca7d6d7fc1bed64e 11-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix MachO's getRelocationAdditionalInfo.

It was returning the loaded address of the section containing the relocation,
which really doesn't seem to be the intent of this function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
b08c6df6787971502bd51e30b0f1038c1ea0dc2c 10-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Template MachOObjectFile over endianness too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
05b96447ab27c394c6cc161ff9b2515ad673d74f 10-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Simplify the templating a bit.

Since we only ever instantiate with a type that is a MachOType instantiation,
we don't need to pass template argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
78fcc47aeedc93e294a94714b6bcd69ff0b06d5f 10-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Move two methods out of line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
a2561a0153237291980722383f409a6499b12efc 10-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Template the MachO types over endianness.

For now they are still only used as little endian.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
774e7c82a84189a1f8194a63dc8040136ca6b4d8 10-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Include the more specific header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
f6cfc15705140cc958b784a1bc98f7f0f09be6be 09-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Convert MachOObjectFile to a template.

For now it is templated only on being 64 or 32 bits. I will add little/big
endian next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
7df9c57651574feccd53aec0aac469dea2b48bc6 09-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add a SymbolTableEntryBase.

Use it when we don't need to know if we have a 32 or 64 bit SymbolTableEntry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
3388589fc102b873ee9b73ffdab0f532ee3ceda6 09-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add a SectionBase struct.

Use it to share code and when we don't need to know if we have a 32 or 64
bit Section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
335f1d46d82a4d6b5a7317ccc73178a47b62fc25 08-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Template the MachO types over the word size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
9d55c099d628d7835dd1b502cb29c96cae350099 08-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add all 4 MachO object types. Use the stored type to implement is64Bits().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
8764c8979c66966b5af62a0a316acead47c038cd 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Make MachOObjectFile independent from MachOObject.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
433611bdf395d08093e3edd52846c1774b46caf2 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Implement MachOObjectFile::getHeader directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
0f08eb135997a94ba37f79aaeb306993c21bbae2 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Implement MachOObjectFile::getHeaderSize and MachOObjectFile::getData.

These were the last missing forwarding functions. Also consistently use
the forwarding functions instead of using MachOObj directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
6ab85a81d711b1e9d3bbc02e05812e7f867a7c40 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove LoadCommandInfo now that we always have a pointer to the command.

LoadCommandInfo was needed to keep a command and its offset in the file. Now
that we always have a pointer to the command, we don't need the offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
77638d9110d67333e4ea8e6bd3206606a89bc24f 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add MachOObjectFile::LoadCommandInfo.

This avoids using MachOObject::getLoadCommandInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
6f1f33915a09a862fd83e7c9f1dc465c2b9e427c 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Construct MachOObject in MachOObjectFile's constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
3eff318cbac281d46e8c8dfef16ffccbceebc855 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove MachOObjectFile::getObject.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
0be4eafd9c90d5e584b951fe2970f024341486c3 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove two uses of getObject.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
1efa60453be658242f468f4be4f8d4855ace60d1 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove usage of InMemoryStruct in getSymbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
7ea2e4869496fb27876d35b93fe99397be29b978 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove a use of InMemoryStruct in llvm-readobj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
305b826f92e0dc7b670238e7caa35ab6e1cf341a 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Make getObject const. Remove a const_cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
196abbffe9b7a760593d68b99cbb5f961efc8e2a 07-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove last use of InMemoryStruct in llvm-objdump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
68d287d19e6918f46e58456fdd237c049efe372e 06-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove last use of InMemoryStruct from MachOObjectFile.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
82a21077a004087a87711bfd7a4ab171cebaa5ec 06-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use InMemoryStruct<macho::SymtabLoadCommand>.

This also required not using the RegisterStringTable API, which is also a
good thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
05b5bdd024d07e7a62f1cdc39f465e10ce5dbc6d 06-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use InMemoryStruct in getSymbol64TableEntry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
00555c13be54b7933cf5a68b50f8a7494bcd5777 06-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use InMemoryStruct in getSymbolTableEntry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
5cf0f51ae6530751eeeccefa55c87f1d3422d0ae 06-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use InMemoryStruct in getRelocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
0e5dc8aacb548d51b0ca9035a7d449a8e5862dd2 05-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Define versions of Section that are explicitly marked as little endian.

These should really be templated like ELF, but this is a start.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
c1cd6aa7a485933fa1b451c8df899ae78382b391 05-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use InMemoryStruct in getSection and getSection64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
f16c2bb320f4d5b33dfaf8df8865f547e6d66005 05-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't fetch pointers from a InMemoryStruct.

InMemoryStruct is extremely dangerous as it returns data from an internal
buffer when the endiannes doesn't match. This should fix the tests on big
endian hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
cef81b37c77978cd4dddb4a5ad13564793ded155 21-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> 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
/external/llvm/include/llvm/Object/MachO.h
cd7ee1ced017d7a957113df9d6cf855ecbc3797e 19-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Revert 170545 while I debug the ppc failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
f9a6bd8524ba16d3e4036304ffdc9475df6844f2 19-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Add r170095 back.

I cannot reproduce it the failures locally, so I will keep an eye at the ppc
bots. This patch does add the change to the "Disassembly of section" message,
but that is not what was failing on the bots.

Original message:

Add a funciton 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 infor
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
ef8581479e58fe092178a9727f373a61b690a8df 13-Dec-2012 Eric Christopher <echristo@gmail.com> Revert "Add a funciton to get the segment name of a section."

This reverts commit r170095 since it appears to be breaking the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
e3ec87a6f7b718596697727e699a62aed0d40b25 13-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Add a funciton 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 informing
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
255f89faee13dc491cb64fbeae3c763e7e2ea4e6 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for the include/... tree with the script.

AKA: Recompile *ALL* the source code!

This one went much better. No manual edits here. I spot-checked for
silliness and grep-checked for really broken edits and everything seemed
good. It all still compiles. Yell if you see something that looks goofy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
596e474101ea9a8ecac9d8ee090d31469dbcc61d 29-Nov-2012 Jim Grosbach <grosbach@apple.com> Fix a memory leak in MachOObjectFile.

MachOObjectFile owns a MachOObj, but never frees it. Both MachOObjectFile
and MachOObj want to own the MemoryBuffer, though, so we have to be careful
and give them each one of their own.

Thanks to Greg Clayton, Eric Christopher and Michael Spencer for helping
figure out what's going wrong here.

rdar://12561773

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
a41dce3c642e50775352cce49e3a3d0cd004d393 29-Oct-2012 Tim Northover <Tim.Northover@arm.com> Add interface for querying object files for symbol values.

Currently only implemented for ELF.

Patch by Amara Emerson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
ed84062812c7b8a82d0e8128a22aa1aa07a14d79 12-Oct-2012 Sean Silva <silvas@purdue.edu> Remove unnecessary classof()'s

isa<> et al. automatically infer when the cast is an upcast (including a
self-cast), so these are no longer necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
3a129c85920404e7ccdb7e655c89fa60a0309cfd 10-Oct-2012 Andrew Kaylor <andrew.kaylor@intel.com> This patch adds new functions to the SectionRef and ObjectFile interfaces to determine whether or not a section is meant to be read-only. These functions will be used by the MCJIT RuntimeDyld to give hints to the memory manager during the object loading process in a future patch.

Patch by Ashok Thirumurthi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
c68dda815e64fb2fb463318d1eaa304e22199d50 12-Apr-2012 Preston Gurd <preston.gurd@intel.com> This patch improves the MCJIT runtime dynamic loader by adding new handling
of zero-initialized sections, virtual sections and common symbols
and preventing the loading of sections which are not required for
execution such as debug information.

Patch by Andy Kaylor!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
6f9489a86f33624f9ff5388411d12359ce9cef20 09-Mar-2012 David Meyer <pdox@google.com> [Object]
Make Binary::TypeID more granular, to distinguish between ELF 32/64 little/big




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
97f7787bfb56ad31fe20ec0bb9c3c9f3253d14fb 01-Mar-2012 David Meyer <pdox@google.com> [Object]
Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
5c2b4ea73c8f48bb5f96c86fe437385b8fb3dcda 01-Mar-2012 David Meyer <pdox@google.com> [Object]
* Add begin_dynamic_table() / end_dynamic_table() private interface to ELFObjectFile.
* Add begin_libraries_needed() / end_libraries_needed() interface to ObjectFile, for grabbing the list of needed libraries for a shared object or dynamic executable.
* Implement this new interface completely for ELF, leave stubs for COFF and MachO.
* Add 'llvm-readobj' tool for dumping ObjectFile information.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
c46255a32ec92c427e621b6d7eabd887962ce4a4 29-Feb-2012 David Meyer <pdox@google.com> In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), and isWeak(), with a bitset of flags.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
dfa1896b6b61e708f002b814794890ff308172ee 28-Feb-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Object] Add {begin,end}_dynamic_symbols stubs and implementation for ELF.
Add -D option to llvm-nm to dump dynamic symbols.

Patch by David Meyer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
b0436a73054fe676b216a0cf872d1fc433125c62 29-Nov-2011 Danil Malyshev <dmalyshev@accesssoftek.com> Fixed ObjectFile functions:
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
790552c20fbd8daa77d343419f0f6ec4e7fa1457 27-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Revert r145180 as it is causing test failures on all the bots.

Original commit message:
Fixed ObjectFile functions:
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
9b24738bd1dc791eb2c21b5562fcfe4b7b99fe2a 27-Nov-2011 Danil Malyshev <dmalyshev@accesssoftek.com> Fixed ObjectFile functions:
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
1832f4d94eb292d63824eaa043118ed6cc61389b 26-Oct-2011 Owen Anderson <resistor@mac.com> Add support for scattered relocations to the MachO relocatation pretty printer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
9472b8d220fc746498429f430cb4c4dbfbd38f2a 26-Oct-2011 Owen Anderson <resistor@mac.com> Expand relocation type field to 64 bits. MachO scattered relocations require 33 bits of type info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
0685e94895f26f96aa1032696e3150dd00aad1f3 25-Oct-2011 Owen Anderson <resistor@mac.com> Add support for the notion of "hidden" relocations. On MachO, these are relocation entries that are used as additional information for other, real relocations, rather than being relocations themselves.
I'm not familiar enough with ELF or COFF to know if they should have any relocations marked hidden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
d8fa76d4bed067cd8662c3196211bc90cc8d4470 25-Oct-2011 Owen Anderson <resistor@mac.com> More fixes and improvements to MachO relocation pretty-printing, particular for x86 and x86_64 relocations with addends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
9b2b812fea4df160437e7b7d56e38f6335189ad0 18-Oct-2011 Michael J. Spencer <bigcheesegs@gmail.com> Object: Add isSymbolAbsolute and getSymbolSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
c38c36a8c44bd32bdfc2e48ab3e447f6dc1547bd 18-Oct-2011 Michael J. Spencer <bigcheesegs@gmail.com> Object: Add isSymbolWeak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
ab6bcf35aefe823894d349773ebd53f465f122b7 18-Oct-2011 Michael J. Spencer <bigcheesegs@gmail.com> Object: Implement casting for concrete classes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
df3f929ec2debe5402911dea7f3a0d4528365a1c 17-Oct-2011 Owen Anderson <resistor@mac.com> Add an accessor to get the underlying MachO representation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
1130a799ab2fd7042625163a2506518960394884 17-Oct-2011 Michael J. Spencer <bigcheesegs@gmail.com> Object: Fix redundant name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h
f7c93a3867b45e42db6927536f76e7d2869ead60 11-Oct-2011 Owen Anderson <resistor@mac.com> Expose MachOObjectFile externally, like we do for COFF. First step in reducing the amount of special-purpose code needed for llvm-objdump.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Object/MachO.h