1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[llvm-objdump] - llvm-objdump can skip bytes at the end of a section.

Differential Revision: https://reviews.llvm.org/D57549

llvm-svn: 352900
This commit is contained in:
Sid Manning 2019-02-01 19:11:47 +00:00
parent 6ef2840386
commit 999ed6f1b9
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,11 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o -| \
# RUN: llvm-objdump -d - | FileCheck %s
.globl foo
.type foo, @object
foo:
.ascii "this is a test"
# CHECK: foo:
# CHECK: 0:{{.*}}this is
# CHECK: 8:{{.*}}a test

View File

@ -1268,7 +1268,7 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj,
// Indent the space for less than 8 bytes data.
// 2 spaces for byte and one for space between bytes
IndentOffset = 3 * (8 - NumBytes);
for (int Excess = 8 - NumBytes; Excess < 8; Excess++)
for (int Excess = NumBytes; Excess < 8; Excess++)
AsciiData[Excess] = '\0';
NumBytes = 8;
}