Fixing r116753 r116756 r116777
authorJason W Kim <jason.w.kim.2009@gmail.com>
Tue, 19 Oct 2010 17:39:10 +0000 (17:39 +0000)
committerJason W Kim <jason.w.kim.2009@gmail.com>
Tue, 19 Oct 2010 17:39:10 +0000 (17:39 +0000)
commitf7d5278fb32b84b6218a222346202ab3af17057c
tree3644abbf2801a786ca63af47be0bd5bcbb5aa609
parent081c34b725980f995be9080eaec24cd3dfaaf065
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
33 files changed:
test/MC/ELF/alias.s
test/MC/ELF/align-bss.s
test/MC/ELF/align-nops.s
test/MC/ELF/align-size.s
test/MC/ELF/align-text.s
test/MC/ELF/align.s
test/MC/ELF/basic-elf.ll
test/MC/ELF/common.s
test/MC/ELF/common2.s
test/MC/ELF/diff.s
test/MC/ELF/empty.s
test/MC/ELF/entsize.ll
test/MC/ELF/entsize.s
test/MC/ELF/file.s
test/MC/ELF/got.s
test/MC/ELF/local-reloc.s
test/MC/ELF/merge.s
test/MC/ELF/norelocation.s
test/MC/ELF/pic-diff.s
test/MC/ELF/plt.s
test/MC/ELF/relax.s
test/MC/ELF/relocation-386.s
test/MC/ELF/relocation.s
test/MC/ELF/section.s
test/MC/ELF/size.s
test/MC/ELF/sleb.s
test/MC/ELF/uleb.s
test/MC/ELF/undef.s
test/MC/ELF/undef2.s
test/MC/ELF/weak.s
test/MC/ELF/zero.s
test/Scripts/common_dump.py
test/Scripts/elf-dump