9da9e6937f 
								
							 
						 
						
							
							
								
								[Object/COFF]: Expose getSectionContents.  
							
							... 
							
							
							
							llvm-svn: 153051 
							
						 
						
							2012-03-19 20:27:37 +00:00  
				
					
						
							
							
								 
						
							
								53c2d5477a 
								
							 
						 
						
							
							
								
								[Object/COFF]: Expose getSectionName.  
							
							... 
							
							
							
							Also add some documentation.
llvm-svn: 153050 
							
						 
						
							2012-03-19 20:27:15 +00:00  
				
					
						
							
							
								 
						
							
								7a89e0cc01 
								
							 
						 
						
							
							
								
								Fix bug found by warning.  
							
							... 
							
							
							
							llvm-svn: 152812 
							
						 
						
							2012-03-15 17:49:29 +00:00  
				
					
						
							
							
								 
						
							
								d53422d1a7 
								
							 
						 
						
							
							
								
								[Object]  
							
							... 
							
							
							
							Make Binary::TypeID more granular, to distinguish between ELF 32/64 little/big
llvm-svn: 152435 
							
						 
						
							2012-03-09 20:41:57 +00:00  
				
					
						
							
							
								 
						
							
								c429b80da1 
								
							 
						 
						
							
							
								
								[Object]  
							
							... 
							
							
							
							Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object.
llvm-svn: 151845 
							
						 
						
							2012-03-01 22:19:54 +00:00  
				
					
						
							
							
								 
						
							
								2fc34c5f84 
								
							 
						 
						
							
							
								
								[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.
llvm-svn: 151785 
							
						 
						
							2012-03-01 01:36:50 +00:00  
				
					
						
							
							
								 
						
							
								7e4b976c36 
								
							 
						 
						
							
							
								
								[Object] Add symbol attribute flags: ST_ThreadLocal, ST_Common, and ST_Undefined. Implement these completely for ELF.  
							
							... 
							
							
							
							Rename ST_External to ST_Unknown, and slightly change its semantics. It now only indicates that the symbol's type
is unknown, not that the symbol is undefined. (For that, use ST_Undefined).
llvm-svn: 151696 
							
						 
						
							2012-02-29 02:11:55 +00:00  
				
					
						
							
							
								 
						
							
								1df4b84db4 
								
							 
						 
						
							
							
								
								In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), and isWeak(), with a bitset of flags.  
							
							... 
							
							
							
							llvm-svn: 151670 
							
						 
						
							2012-02-28 23:47:53 +00:00  
				
					
						
							
							
								 
						
							
								8c4729fd44 
								
							 
						 
						
							
							
								
								[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.
llvm-svn: 151600 
							
						 
						
							2012-02-28 00:40:37 +00:00  
				
					
						
							
							
								 
						
							
								453173f09a 
								
							 
						 
						
							
							
								
								Remove static ctor.  
							
							... 
							
							
							
							llvm-svn: 151160 
							
						 
						
							2012-02-22 13:42:11 +00:00  
				
					
						
							
							
								 
						
							
								c7d23ddbbb 
								
							 
						 
						
							
							
								
								Expose the ELFObjectFile class directly in the Object/ELF.h header, similarly  
							
							... 
							
							
							
							to what's done for MachO and COFF. This allows advanced uses of the class to
be implemented outside the Object library. In particular, the DyldELFObject
subclass is now moved into its logical home - ExecutionEngine/RuntimeDyld.
This patch was reviewed by Michael Spencer.
llvm-svn: 150327 
							
						 
						
							2012-02-12 06:12:10 +00:00  
				
					
						
							
							
								 
						
							
								1d966ae18e 
								
							 
						 
						
							
							
								
								Object: avoid undefined behavior when bounds-checking  
							
							... 
							
							
							
							Don't form an out of bounds pointer just to test if it
would be out of bounds.
Also perform the same bounds checking for all the previous
mapped structures.
llvm-svn: 149750 
							
						 
						
							2012-02-04 02:41:39 +00:00  
				
					
						
							
							
								 
						
							
								88297ef665 
								
							 
						 
						
							
							
								
								Sink assert-only variables into the asserts  
							
							... 
							
							
							
							llvm-svn: 148849 
							
						 
						
							2012-01-24 19:43:30 +00:00  
				
					
						
							
							
								 
						
							
								54db64e2e4 
								
							 
						 
						
							
							
								
								Silence warnings in -asserts build  
							
							... 
							
							
							
							llvm-svn: 148715 
							
						 
						
							2012-01-23 18:46:04 +00:00  
				
					
						
							
							
								 
						
							
								bff72ba77e 
								
							 
						 
						
							
							
								
								Remove trailing spaces  
							
							... 
							
							
							
							llvm-svn: 148654 
							
						 
						
							2012-01-22 09:02:48 +00:00  
				
					
						
							
							
								 
						
							
								c3c80f0986 
								
							 
						 
						
							
							
								
								Basic runtime dynamic loading capabilities added to ELFObjectFile, implemented  
							
							... 
							
							
							
							in a subclass named DyldELFObject. This class supports rebasing the object file
it represents by re-mapping section addresses to the actual memory addresses
the object was placed in. This is required for MC-JIT implementation on ELF with
debugging support.
Patch reviewed on llvm-commits.
Developed together with Ashok Thirumurthi and Andrew Kaylor.
llvm-svn: 148653 
							
						 
						
							2012-01-22 09:01:03 +00:00  
				
					
						
							
							
								 
						
							
								2d3dac3e87 
								
							 
						 
						
							
							
								
								Remove unused variables.  
							
							... 
							
							
							
							llvm-svn: 147261 
							
						 
						
							2011-12-25 01:20:19 +00:00  
				
					
						
							
							
								 
						
							
								a379b18173 
								
							 
						 
						
							
							
								
								Unweaken vtables as per  http://llvm.org/docs/CodingStandards.html#ll_virtual_anch  
							
							... 
							
							
							
							llvm-svn: 146960 
							
						 
						
							2011-12-20 02:50:00 +00:00  
				
					
						
							
							
								 
						
							
								27a7489a03 
								
							 
						 
						
							
							
								
								LLVMBuild: Remove trailing newline, which irked me.  
							
							... 
							
							
							
							llvm-svn: 146409 
							
						 
						
							2011-12-12 19:48:00 +00:00  
				
					
						
							
							
								 
						
							
								539d0a8a09 
								
							 
						 
						
							
							
								
								build/CMake: Finish removal of add_llvm_library_dependencies.  
							
							... 
							
							
							
							llvm-svn: 145420 
							
						 
						
							2011-11-29 19:25:30 +00:00  
				
					
						
							
							
								 
						
							
								cbe72fc959 
								
							 
						 
						
							
							
								
								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.
llvm-svn: 145408 
							
						 
						
							2011-11-29 17:40:10 +00:00  
				
					
						
							
							
								 
						
							
								9339d4556e 
								
							 
						 
						
							
							
								
								Fix some possible gcc-4.2 may be used uninitialized warnings.  
							
							... 
							
							
							
							llvm-svn: 145292 
							
						 
						
							2011-11-28 22:19:32 +00:00  
				
					
						
							
							
								 
						
							
								37ab257b88 
								
							 
						 
						
							
							
								
								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.
llvm-svn: 145182 
							
						 
						
							2011-11-27 10:37:47 +00:00  
				
					
						
							
							
								 
						
							
								2631f93f7d 
								
							 
						 
						
							
							
								
								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.
llvm-svn: 145180 
							
						 
						
							2011-11-27 10:12:52 +00:00  
				
					
						
							
							
								 
						
							
								d27d51fbaf 
								
							 
						 
						
							
							
								
								Object/COFF: Support common symbols.  
							
							... 
							
							
							
							llvm-svn: 144861 
							
						 
						
							2011-11-16 23:36:12 +00:00  
				
					
						
							
							
								 
						
							
								52823cc91c 
								
							 
						 
						
							
							
								
								build: Attempt to rectify inconsistencies between CMake and LLVMBuild versions of explicit dependencies.  
							
							... 
							
							
							
							- The hope is that we have a tool/test to verify these are accurate (and tight) soon.
llvm-svn: 144444 
							
						 
						
							2011-11-12 02:10:57 +00:00  
				
					
						
							
							
								 
						
							
								d5930ca99d 
								
							 
						 
						
							
							
								
								Object/COFF: Fix PE reading.  
							
							... 
							
							
							
							llvm-svn: 144148 
							
						 
						
							2011-11-08 23:34:07 +00:00  
				
					
						
							
							
								 
						
							
								c1cb1be9b4 
								
							 
						 
						
							
							
								
								MachOObject: Use DataExtractor's uleb parser instead of rolling our own.  
							
							... 
							
							
							
							llvm-svn: 143810 
							
						 
						
							2011-11-05 12:13:21 +00:00  
				
					
						
							
							
								 
						
							
								4246ca4021 
								
							 
						 
						
							
							
								
								Simplify code.  
							
							... 
							
							
							
							llvm-svn: 143695 
							
						 
						
							2011-11-04 13:52:17 +00:00  
				
					
						
							
							
								 
						
							
								bf9bba47a1 
								
							 
						 
						
							
							
								
								build: Add initial cut at LLVMBuild.txt files.  
							
							... 
							
							
							
							llvm-svn: 143634 
							
						 
						
							2011-11-03 18:53:17 +00:00  
				
					
						
							
							
								 
						
							
								d294af104a 
								
							 
						 
						
							
							
								
								Removed unused variable.  
							
							... 
							
							
							
							llvm-svn: 143591 
							
						 
						
							2011-11-02 23:21:55 +00:00  
				
					
						
							
							
								 
						
							
								d0f5b0e194 
								
							 
						 
						
							
							
								
								object/COFF: Properly initalize uses of DataRefImpl.  
							
							... 
							
							
							
							llvm-svn: 143562 
							
						 
						
							2011-11-02 19:33:26 +00:00  
				
					
						
							
							
								 
						
							
								e03ea9cd71 
								
							 
						 
						
							
							
								
								Object/Archive: Add symbol table iteration.  
							
							... 
							
							
							
							llvm-svn: 143561 
							
						 
						
							2011-11-02 19:33:12 +00:00  
				
					
						
							
							
								 
						
							
								debe01c660 
								
							 
						 
						
							
							
								
								If we're searching for a symbol reference to pretty-print a scattered relocation address, and we don't find a symbol table entry, try section begin addresses as well.  
							
							... 
							
							
							
							llvm-svn: 143151 
							
						 
						
							2011-10-27 21:53:50 +00:00  
				
					
						
							
							
								 
						
							
								62972f5cd3 
								
							 
						 
						
							
							
								
								Fix pretty printing of i386 local sect diff relocations, TLV relocations, and x86_64 TLV relocations in MachO.  
							
							... 
							
							
							
							llvm-svn: 143140 
							
						 
						
							2011-10-27 20:46:09 +00:00  
				
					
						
							
							
								 
						
							
								f7a89d06ec 
								
							 
						 
						
							
							
								
								Expose relocation accessors through the libObject C API.  
							
							... 
							
							
							
							llvm-svn: 143109 
							
						 
						
							2011-10-27 17:32:36 +00:00  
				
					
						
							
							
								 
						
							
								e245af65fa 
								
							 
						 
						
							
							
								
								Add relocation iterators to the libObject C API.  
							
							... 
							
							
							
							llvm-svn: 143107 
							
						 
						
							2011-10-27 17:15:47 +00:00  
				
					
						
							
							
								 
						
							
								bc14bd3bfb 
								
							 
						 
						
							
							
								
								Add support for scattered relocations to the MachO relocatation pretty printer.  
							
							... 
							
							
							
							llvm-svn: 143051 
							
						 
						
							2011-10-26 20:42:54 +00:00  
				
					
						
							
							
								 
						
							
								90c49c037e 
								
							 
						 
						
							
							
								
								The order of the two symbol listings in a Macho x86_64 subtractor relocation is reversed from what seems intuitive to me.  
							
							... 
							
							
							
							llvm-svn: 143035 
							
						 
						
							2011-10-26 17:28:49 +00:00  
				
					
						
							
							
								 
						
							
								04e46b6ae4 
								
							 
						 
						
							
							
								
								Include the full 64 bits of relocation data in the type info for MachO relocations, so that we can recognize scattered relocations.  
							
							... 
							
							
							
							llvm-svn: 143033 
							
						 
						
							2011-10-26 17:10:22 +00:00  
				
					
						
							
							
								 
						
							
								7be76590e6 
								
							 
						 
						
							
							
								
								Expand relocation type field to 64 bits.  MachO scattered relocations require 33 bits of type info.  
							
							... 
							
							
							
							llvm-svn: 143032 
							
						 
						
							2011-10-26 17:08:49 +00:00  
				
					
						
							
							
								 
						
							
								b92de2de71 
								
							 
						 
						
							
							
								
								Improve pretty printing of GOT relocations in MachO on x86_64.  
							
							... 
							
							
							
							llvm-svn: 143031 
							
						 
						
							2011-10-26 17:05:20 +00:00  
				
					
						
							
							
								 
						
							
								ff37313f12 
								
							 
						 
						
							
							
								
								Remove unused variable.  
							
							... 
							
							
							
							llvm-svn: 143011 
							
						 
						
							2011-10-26 03:47:16 +00:00  
				
					
						
							
							
								 
						
							
								6e080ddb31 
								
							 
						 
						
							
							
								
								Object/Archive: Cleanup anon namespace.  
							
							... 
							
							
							
							llvm-svn: 142983 
							
						 
						
							2011-10-25 22:31:11 +00:00  
				
					
						
							
							
								 
						
							
								9aaa852336 
								
							 
						 
						
							
							
								
								Object/Archive: Add BSD style long file name support and skip internal members.  
							
							... 
							
							
							
							llvm-svn: 142981 
							
						 
						
							2011-10-25 22:30:42 +00:00  
				
					
						
							
							
								 
						
							
								377137e2ed 
								
							 
						 
						
							
							
								
								Remove extraneous printing of "-PC".  
							
							... 
							
							
							
							llvm-svn: 142970 
							
						 
						
							2011-10-25 20:44:00 +00:00  
				
					
						
							
							
								 
						
							
								fa3e5200b8 
								
							 
						 
						
							
							
								
								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.
llvm-svn: 142961 
							
						 
						
							2011-10-25 20:35:53 +00:00  
				
					
						
							
							
								 
						
							
								52cd8acafc 
								
							 
						 
						
							
							
								
								Teach the MachO relocation pretty-printer to interpret ARM half-relocations.  
							
							... 
							
							
							
							llvm-svn: 142938 
							
						 
						
							2011-10-25 18:48:41 +00:00  
				
					
						
							
							
								 
						
							
								171f485f15 
								
							 
						 
						
							
							
								
								More fixes and improvements to MachO relocation pretty-printing, particular for x86 and x86_64 relocations with addends.  
							
							... 
							
							
							
							llvm-svn: 142875 
							
						 
						
							2011-10-24 23:20:07 +00:00  
				
					
						
							
							
								 
						
							
								c8c94da8c8 
								
							 
						 
						
							
							
								
								Get relocation parsing/dumping to a mostly-working state for MachO files.  
							
							... 
							
							
							
							llvm-svn: 142852 
							
						 
						
							2011-10-24 21:44:00 +00:00