Commit Graph

39 Commits

Author SHA1 Message Date
Shankar Easwaran
a8028e5884 numerically sort the symbols, so that the testcase result is uniform
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167872 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-13 21:01:11 +00:00
Daniel Dunbar
ed074e9a1b llvm-nm: Make sort more stable when symbol names are equal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167866 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-13 19:39:55 +00:00
Shankar Easwaran
206252cc9f Adding changes to support GNU style archive library reading
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167853 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-13 18:38:42 +00:00
Alexey Samsonov
01fa41a106 Fix SymbolRef::getAddress implementation for ELF. The 'value' field in symbol table entry should be treated differently for relocatable and relocated files. This patch fixes symbol addresses printed by llvm-nm for executables and shared objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164365 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-21 07:08:08 +00:00
Nick Lewycky
0c09e76e52 Add missing file for test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163272 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-05 23:52:20 +00:00
Nick Lewycky
033d182589 Teach libObject about some more ELF relocations. llvm-objdump -r now knows
every relocation in C++ hello world built with debug info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163271 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-05 23:48:54 +00:00
NAKAMURA Takumi
68990df1f9 Create llvm/test/Object/Mips/lit.local.cfg to check Mips in targets_to_build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162819 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29 01:37:57 +00:00
Jack Carter
f05da8ebd6 Moved input for objdump test from Mips to Inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162808 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29 00:10:48 +00:00
Jack Carter
fd6d165155 Some of the instructions in the Mips instruction set are revision
delimited. llvm-mc -disassemble access these through the -mattr
option.

llvm-objdump -disassemble had no such way to set the attribute so
some instructions were just not recognized for disassembly.

This patch accepts llvm-mc mechanism for specifying the attributes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162781 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28 19:24:49 +00:00
Matt Beaumont-Gay
923123c370 Move test yaml files under Inputs until they are converted to be the actual
test files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161219 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 21:52:49 +00:00
Michael J. Spencer
a915f247f7 Add yaml2obj. A utility to convert YAML to binaries.
yaml2obj takes a textual description of an object file in YAML format
and outputs the binary equivalent. This greatly simplifies writing
tests that take binary object files as input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161205 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 19:16:56 +00:00
Marshall Clow
50b4c52633 Add relocation types for Hexagon processor; patch by Sidney Manning <sidneym@codeaurora.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159081 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-23 14:46:18 +00:00
Eli Bendersky
cc85160672 Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu
* Removed test/lib/llvm.exp - it is no longer needed 
* Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
  left in the test suite so this code is no longer required. test/lit.cfg is
  now much shorter and clearer 
* Removed a lot of duplicate code in lit.local.cfg files that need access to
  the root configuration, by adding a "root" attribute to the TestingConfig
  object. This attribute is dynamically computed to provide the same
  information as was previously provided by the custom getRoot functions. 
* Documented the config.root attribute in docs/CommandGuide/lit.pod





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153408 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-25 09:02:19 +00:00
David Meyer
2d70e263c2 Support reading GNU symbol versions in ELFObjectFile
* Add enums and structures for GNU version information.
* Implement extraction of that information on a per-symbol basis (ELFObjectFile::getSymbolVersion).
* Implement a generic interface, GetELFSymbolVersion(), for getting the symbol version from the ObjectFile (hides the templating).
* Have llvm-readobj print out the version, when available.
* Add a test for the new feature: readobj-elf-versioning.test



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152436 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-09 20:59:52 +00:00
David Meyer
97f7787bfb [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
2012-03-01 22:19:54 +00:00
David Meyer
5c2b4ea73c [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
2012-03-01 01:36:50 +00:00
Michael J. Spencer
dfa1896b6b [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
2012-02-28 00:40:37 +00:00
Eli Bendersky
0f0c411079 Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed.
Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-16 06:28:33 +00:00
Danil Malyshev
b0436a7305 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
2011-11-29 17:40:10 +00:00
Eli Friedman
dc9414d62f Move x86-specific tests into X86 folder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 03:21:48 +00:00
Matt Beaumont-Gay
11f9987876 Change the actual tests to match the input directory rename (duh)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143404 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 23:56:52 +00:00
Matt Beaumont-Gay
be7a772a56 Rename "TestObjectFiles" to "Inputs" (like the pattern for Clang tests)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143400 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 23:46:38 +00:00
Michael J. Spencer
93fe4ae091 Object: change test to create archive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142982 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-25 22:30:58 +00:00
Michael J. Spencer
22ff0f33db llvm-objdump: Add static symbol table dumping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142404 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-18 19:32:17 +00:00
Michael J. Spencer
4984d647da Revert "llvm-objdump: Add static symbol table dumping."
This reverts commit 0c30d4e4f5f9110c5a67bd0ca84444dc58697596.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142320 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-18 00:17:04 +00:00
Michael J. Spencer
b12715de41 llvm-objdump: Add static symbol table dumping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142319 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-17 23:55:22 +00:00
Michael J. Spencer
1e8ba3fa21 llvm-objdump: Add -s, which prints the contents of each section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142199 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-17 17:13:22 +00:00
Michael J. Spencer
d955cf2366 llvm-objdump: Add tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142198 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-17 17:13:05 +00:00
Michael J. Spencer
63b2f8c710 ELF: Fix the section that relocations apply to. Add test to verify. Patch by Danil Malyshev!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141901 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-13 22:30:10 +00:00
Michael J. Spencer
942eb00911 llvm-object: Add inline relocation information to disassembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141897 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-13 22:17:18 +00:00
Nick Lewycky
023bb15bea Add support for dumping section headers to llvm-objdump. This uses the same
flags as binutils objdump but the output is different, not just in format but
also showing different sections. Compare its results against readelf, not
objdump.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141579 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-10 21:21:34 +00:00
Michael J. Spencer
27781b78e1 llvm-objdump: Add relocation and archive support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141451 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-08 00:18:30 +00:00
Michael J. Spencer
9142ae2cf8 Add binary archive support to llvm-nm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140627 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 19:37:18 +00:00
Michael J. Spencer
98d0416fbf Unbreak tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140622 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 19:06:37 +00:00
Michael J. Spencer
e696b350f4 Revert "Object: Renable the tests now that none of the build bots complain about aliasing."
This reverts commit 281f3901b7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123972 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-21 06:27:04 +00:00
Michael J. Spencer
281f3901b7 Object: Renable the tests now that none of the build bots complain about aliasing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123964 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-21 05:07:13 +00:00
Devang Patel
163b5d23ab Disable objdump-trivial-object.test. It is broken on powerpc-darwin9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123928 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-20 18:08:44 +00:00
Michael J. Spencer
fafb8a1ba5 Disable this test until I can figure out why it's broken. Not xfailed because it
usese 100% CPU and times out, so it's annoying to run it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123915 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-20 16:24:07 +00:00
Michael J. Spencer
db26073c6a Object: Add some tests!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123899 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-20 06:39:15 +00:00