Michael J. Spencer
02c5e58b03
llvm-nm: refactor in order to support reading files from stdin.
...
llvm-svn: 146524
2011-12-13 23:17:29 +00:00
Daniel Dunbar
30d6a45140
LLVMBuild: Remove trailing newline, which irked me.
...
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Danil Malyshev
5ce4e1a9d3
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
Chandler Carruth
e5e455c97f
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
Danil Malyshev
3bbe062799
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
Daniel Dunbar
efa02a0c3d
LLVMBuild: Add description files for the LLVM tools.
...
llvm-svn: 144417
2011-11-11 22:59:39 +00:00
Stepan Dyatkovskiy
d1216f47ca
uint64 formatted output: replaced %llx with PRIx64 macro.
...
llvm-svn: 143191
2011-10-28 13:07:32 +00:00
Michael J. Spencer
2ec1e8e92f
llvm-nm: Use correct format string. Patch by Stepan Dyatkovskiy!
...
llvm-svn: 142984
2011-10-25 22:45:47 +00:00
Daniel Dunbar
81780d9982
build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
...
new all-targets pseudo-component.
llvm-svn: 142401
2011-10-18 19:27:24 +00:00
Benjamin Kramer
357893ba6f
llvm-nm: Don't leak bitcode buffers.
...
llvm-svn: 141534
2011-10-10 13:10:04 +00:00
Michael J. Spencer
3cc26e4c5e
Fix GCC again.
...
llvm-svn: 141389
2011-10-07 19:46:12 +00:00
Michael J. Spencer
89e83b38cd
Add binary archive support to llvm-nm.
...
llvm-svn: 140627
2011-09-27 19:37:18 +00:00
Benjamin Kramer
52607b3842
Object: make the following changes into SymbolRef
...
- Add enum SymbolType and function getSymbolType()
- Add function isGlobal() - it's returns true for symbols that can be used in another objects, such as library functions.
- Rename function getAddress() to getOffset() and add new function getAddress(), because currently getAddress() returns section offset of symbol first byte. new getAddress() return symbol address.
- Change usage SymbolRef::getAddress() to getOffset() in tools/llvm-nm and tools/llvm-objdump.
Patch by Danil Malyshev!
llvm-svn: 139683
2011-09-14 01:22:52 +00:00
Michael J. Spencer
83e956656a
Object: Add proper error handling.
...
llvm-svn: 133872
2011-06-25 17:55:23 +00:00
Michael J. Spencer
0e64ab8463
Modify llvm-nm to use new Binary creation method.
...
llvm-svn: 133871
2011-06-25 17:54:59 +00:00
Michael J. Spencer
d5934fefee
Make Binary the parent of ObjectFile and update children to new interface.
...
llvm-svn: 133870
2011-06-25 17:54:50 +00:00
Michael J. Spencer
8288453980
Revert the last two commits in the series. r132911, r132912.
...
llvm-svn: 132913
2011-06-13 11:53:31 +00:00
Michael J. Spencer
c6fd5f05fc
Modify llvm-nm to use new Binary creation method.
...
llvm-svn: 132912
2011-06-13 11:12:42 +00:00
Michael J. Spencer
642af05937
Make Binary the parent of ObjectFile and update children to new interface.
...
llvm-svn: 132911
2011-06-13 11:12:33 +00:00
Michael J. Spencer
65584e095c
llvm-nm: Update to use the new LLVMObject library.
...
llvm-svn: 123897
2011-01-20 06:38:57 +00:00
Michael J. Spencer
86f6a9ac6e
MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
...
llvm-svn: 121958
2010-12-16 03:29:14 +00:00
Michael J. Spencer
15483143ec
Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
...
llvm-svn: 121379
2010-12-09 17:36:48 +00:00
Michael J. Spencer
d5ec932c3a
Merge System into Support.
...
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Michael J. Spencer
90f807fda5
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
...
This reverts commit r113632
Conflicts:
cmake/modules/AddLLVM.cmake
llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer
98ad3f2ea7
CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
...
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Michael J. Spencer
ab565264fa
Cleanup Whitespace.
...
llvm-svn: 112587
2010-08-31 06:36:46 +00:00
Bill Wendling
9e3d8d1a60
- Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
...
- Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp.
llvm-svn: 111952
2010-08-24 20:00:52 +00:00
Bill Wendling
90b6422f2f
Implement the "linker_private_weak" linkage type. This will be used for
...
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.
For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
Currently only supported on Darwin platforms.
llvm-svn: 107433
2010-07-01 21:55:59 +00:00
Bill Wendling
59ef9bcc6d
Revert r107205 and r107207.
...
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling
05a4c0b1f2
Introducing the "linker_weak" linkage type. This will be used for Objective-C
...
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Chris Lattner
5a57121631
make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
...
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Chris Lattner
276811b58a
Stop building RTTI information for *most* llvm libraries. Notable
...
missing ones are libsupport, libsystem and libvmcore. libvmcore is
currently blocked on bugpoint, which uses EH. Once it stops using
EH, we can switch it off.
This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.
llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Nuno Lopes
a79196d2a9
fix leakage of Module
...
llvm-svn: 81445
2009-09-10 14:56:31 +00:00
Bill Wendling
1a10a060cb
Add plumbing for the `linker_private' linkage type. This type is meant for
...
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.
This is plumbing, so we don't have a use of it yet. More to come, etc.
llvm-svn: 76385
2009-07-20 01:03:30 +00:00
Dan Gohman
6abbc537f4
Convert more tools code from cerr and cout to errs() and outs().
...
llvm-svn: 76070
2009-07-16 15:30:09 +00:00
Owen Anderson
5c64fb5a80
To simplify the upcoming context-on-type change, switch all command line tools to using the default global context for now.
...
This will let us to hardwire stuff to the global context in the short term while the API is sorted out.
llvm-svn: 75846
2009-07-15 22:16:10 +00:00
Dan Gohman
60dce4c56b
Use errs() instead of std::cerr.
...
llvm-svn: 75791
2009-07-15 16:35:29 +00:00
Owen Anderson
cf112e59c3
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Owen Anderson
81b8dabb53
Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
...
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.
Patches for Clang and LLVM-GCC to follow.
llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Chris Lattner
c1bfdc9bb2
Add a new "available_externally" linkage type. This is intended
...
to support C99 inline, GNU extern inline, etc. Related bugzilla's
include PR3517, PR3100, & PR2933. Nothing uses this yet, but it
appears to work.
llvm-svn: 68940
2009-04-13 05:44:34 +00:00
Chris Lattner
1b05680d5f
Change various llvm utilities to use PrettyStackTraceProgram in
...
their main routines. This makes the tools print their argc/argv
commands if they crash.
llvm-svn: 66248
2009-03-06 05:34:10 +00:00
Chris Lattner
4869ed1aa7
disable exports from a bunch more tools, those without plugins.
...
llvm-svn: 65558
2009-02-26 19:01:11 +00:00
Rafael Espindola
0aba6c9435
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Oscar Fuentes
0f25988689
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Dale Johannesen
5da4b3ee8b
Add CommonLinkage to lto (treated same as weak AFAICT)
...
and llvm-nm (prints as C).
llvm-svn: 51209
2008-05-16 22:44:18 +00:00
Chris Lattner
309aeb140b
remove attributions from tools.
...
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Chris Lattner
11718ad357
remove attributions from tools/utils makefiles.
...
llvm-svn: 45414
2007-12-29 20:07:17 +00:00
Dan Gohman
2e8245a376
Move the space in overview output for commands out of each of the
...
commands and into the common code.
llvm-svn: 42752
2007-10-08 15:45:12 +00:00
Gabor Greif
5f705671e4
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Lauro Ramos Venancio
aed8d1f617
llvm-nm must print the alias symbols.
...
llvm-svn: 37766
2007-06-27 22:08:09 +00:00