1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

16 Commits

Author SHA1 Message Date
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
Benjamin Kramer
da0ca686c9 Remove dead code.
llvm-svn: 139343
2011-09-09 00:22:05 +00:00
Nick Lewycky
ec5437bfc4 Fix release build:
MachOObjectFile.cpp:524: error: unused variable 'NumLoadCommands' [-Wunused-variable]

llvm-svn: 139341
2011-09-09 00:16:50 +00:00
Benjamin Kramer
3c40c2100b Add support for relocations to ObjectFile.
Patch by Danil Malyshev!

llvm-svn: 139314
2011-09-08 20:52:17 +00:00
Benjamin Kramer
5936e08079 ObjectFile: Add a method to check whether a section contains a symbol.
- No ELF or COFF implementation yet, I don't have a way to test that.
  Should be straightforward to add though.

llvm-svn: 135288
2011-07-15 18:39:21 +00:00
Benjamin Kramer
3a3a5a7f5e MachOObjectFile: Get symbol functions ready for 64 bit.
llvm-svn: 135282
2011-07-15 17:32:45 +00:00
Benjamin Kramer
5365237e2e Output MachO section names in the form SEGMENT,section.
llvm-svn: 135231
2011-07-15 00:29:02 +00:00
Benjamin Kramer
4ab7b03d14 Add support for 64 bit objects to MachOObjectFile.
- I don't see a better way than duplicating all the code.

llvm-svn: 135229
2011-07-15 00:14:48 +00:00
Benjamin Kramer
3622333b55 MachOObjectFile: Change isSectionText to return true for sections named text, not for load commands name __TEXT (which isn't the case in actual object files)
llvm-svn: 135228
2011-07-15 00:14:46 +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
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
642af05937 Make Binary the parent of ObjectFile and update children to new interface.
llvm-svn: 132911
2011-06-13 11:12:33 +00:00
Eric Christopher
dbe03d6412 Use enums for constant values.
llvm-svn: 129984
2011-04-22 06:34:01 +00:00
Eric Christopher
f48677a625 Make the file format strings a little prettier for mach-o.
llvm-svn: 129980
2011-04-22 04:08:58 +00:00
Eric Christopher
f030d7f487 Add an ObjectFile implementation for mach-o.
Patch by Patrick Walton!

llvm-svn: 129974
2011-04-22 03:19:48 +00:00