Commit Graph

73 Commits

Author SHA1 Message Date
Jack Carter
0140e55393 This allows hello world to be compiled for Mips 64 direct object.
It takes advantage of r159299 which introduces relocation support for N64. 
elf-dump needed to be upgraded to support N64 relocations as well.

This passes make check.

Jack


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159301 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 22:48:25 +00:00
Rafael Espindola
5c4e52e496 Fix the bitwidth of the remaining fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136884 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 17:00:11 +00:00
Rafael Espindola
251a2bbfb0 print st_shndx with the correct number of bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136880 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 15:50:13 +00:00
Rafael Espindola
67ac0c0d63 print st_other with the correct number of bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136877 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 15:38:19 +00:00
Rafael Espindola
71a8f5ca12 print st_type with the correct number of bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136875 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 15:24:00 +00:00
Rafael Espindola
d7c278326f Print st_bind with the correct number of bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136874 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 15:10:35 +00:00
Rafael Espindola
a83f8ef9b4 Print r_sym with the correct number of bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136873 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 14:48:27 +00:00
Rafael Espindola
f81f6758f3 Print r_type with the correct number of bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136872 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 14:39:30 +00:00
Rafael Espindola
65ad8dc807 Another counter goes decimal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136871 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 14:27:46 +00:00
Rafael Espindola
f7179de2a5 Change anther counter to decimal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136870 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 14:01:03 +00:00
Rafael Espindola
014180d387 Don't print a counter in hex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136869 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 13:39:15 +00:00
Rafael Espindola
d7c9b63b58 Print all the bits in the addend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136867 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04 13:00:24 +00:00
Roman Divacky
1ae3c165f7 Print all 64bits for st_value and st_size. Adjust tests accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 20:49:43 +00:00
Jason W Kim
6147bda061 Fix elf-dump --dump-section-data for .bss section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121927 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 00:15:10 +00:00
Daniel Dunbar
4e45256a06 macho-dump: Switch to C++ macho-dump tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121466 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 06:19:45 +00:00
Daniel Dunbar
44fa0473ae macho-dump: Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120185 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-27 04:00:06 +00:00
NAKAMURA Takumi
b087c8490f test/Scripts/macho-dump: Make hack for Python-2.4. [PR7995]
With Python-2.4, Reader::read64 always returns (unexpected) long integer.
FileCheck detects failure on test/MC/MachO among '0' and '0L'.

CentOS5(aka RHEL5 clone) provides python-2.4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 01:14:16 +00:00
Jason W Kim
7ab2af03d8 Cut unneeded global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116953 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20 22:01:39 +00:00
Jason W Kim
f7d5278fb3 Fixing r116753 r116756 r116777
The failures in r116753 r116756 were caused by a python issue -
Python likes to append 'L' suffix to stringified numbers if the number
is larger than a machine int. Unfortunately, this causes a divergence of
behavior between 32 and 64 bit python versions.

I re-crafted elf-dump/common_dump to take care of these issues by:

1. always printing 0x (makes for easy sed/regex)
2. always print fixed length (exactly 2 + numBits/4 digits long)
   by mod ((2^numBits) - 1)
3. left-padded with '0'

There is a residual common routine that is also used by
macho-dump (dataToHex) , so I left the 'section_data' test values alone.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116823 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 17:39:10 +00:00
Eric Christopher
1dcb1eafbc Speculatively revert 116753 and 116756 to attempt to fix the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116777 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 00:19:49 +00:00
Jason W Kim
4a23a376c0 Get rid of unneeded FormatOutput global variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116756 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-18 21:59:38 +00:00
Jason W Kim
e7d4a4c6c8 Changed elf-dump to output hex format by default.
Also updated tests. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116753 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-18 21:32:41 +00:00
Michael J. Spencer
0de25f7b38 Fix Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116038 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 03:17:21 +00:00
Michael J. Spencer
6ab219de7e MC-COFF: Fix Simple and Complex type. Fixes PR8320.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116037 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 03:17:11 +00:00
Michael J. Spencer
68a1a9bff7 test: Fix binary stdin issues with coff-dump on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 06:29:21 +00:00
Michael J. Spencer
a25c0a4283 test/COFF: Fix symbol indexes and names. Update tests to match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 17:57:08 +00:00
Michael J. Spencer
3ef2c9f6d7 test/coff-dump: Support reading from stdin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 17:56:46 +00:00
Michael J. Spencer
00002796bb test: Fix coff-dump section array indicies to 1 based to match file format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113928 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 03:58:51 +00:00
Michael J. Spencer
9c0c5c16e9 Tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113927 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 03:58:39 +00:00
Michael J. Spencer
aeb83c4d40 Cleanup coff-dump.py
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113926 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 03:58:24 +00:00
Rafael Espindola
1264937212 Add missing single quotes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-11 15:45:48 +00:00
Rafael Espindola
228290c0d1 Change section_data dumping to print hex numbers instead of using
python's %r.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-11 15:25:58 +00:00
Benjamin Kramer
a754be42da Add an elf-dumper utility.
- Output format and some of the code stolen from macho-dump.
- Somewhat incomplete and probably buggy.
- Comes with a very basic test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113488 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 15:00:41 +00:00
NAKAMURA Takumi
8794dd794e coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-30 15:19:56 +00:00
Anton Korobeynikov
d7343ddce5 Add some win64 coff goodness.
Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 21:05:54 +00:00
Tobias Grosser
56029271f9 Make coff-dump.py executable and add python as executable for this script.
This fixes the MC/COFF/basic-coff.ll test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109497 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27 09:01:26 +00:00
Michael J. Spencer
dfd30187c6 Make MC use Windows COFF on Windows and add tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109494 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27 06:46:15 +00:00
Daniel Dunbar
9c57c29921 tests: Run macho-dump with binary unbuffered streams on Windows, I can't find a Python 2.6 way to change stdin to binary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105894 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-12 17:05:28 +00:00
Daniel Dunbar
4fc9599b0e tests: Make macho-dump.bat actually work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105891 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-12 16:21:54 +00:00
Daniel Dunbar
0f29ad6448 tests: Add wrapper script for calling macho-dump on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105856 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-11 23:29:48 +00:00
Jeffrey Yasskin
0392080fbf Revert r98892. BSD systems may not have bash installed at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 00:32:11 +00:00
Jeffrey Yasskin
1ff781fb50 Work around a valgrind oddity where it doesn't pass the full path of a
script to the #! command by using bash instead of /bin/sh.  Bash
searches $PATH for its script argument, but dash, which /bin/sh
resolves to on some systems, does not.
https://bugs.kde.org/show_bug.cgi?id=231257 tracks the valgrind
problem.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98892 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 22:56:02 +00:00
Daniel Dunbar
5691e74f97 MC/X86_64: Symbol support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 22:49:35 +00:00
Daniel Dunbar
f0a0be47ed macho-dump: Basic Mach 64 support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 22:10:11 +00:00
Daniel Dunbar
3bc1b19930 Teach macho-dump to dump UUIDs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85012 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-24 20:32:36 +00:00
Chris Lattner
4a8e17da32 remove notcast, it is now dead!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 04:27:02 +00:00
Daniel Dunbar
48f7ce88a6 Add count/not tools as executables.
- Apparently, I'm willing to do incredibly stupid things in the name of portability.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 06:23:57 +00:00
Daniel Dunbar
f3e2d80770 Remove prcontext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81427 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10 04:56:59 +00:00
Daniel Dunbar
6c2e2d1c6b llvm-mc/Mach-O: Dump relocations and section data (optionally) in my Mach-O dumper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 13:57:44 +00:00
Daniel Dunbar
573e53627e llvm-mc: Fix tests for python variations in int printing, sigh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 04:28:45 +00:00