Skip to content

Commit

Permalink
[llvm-objdump] Prefix memory operand addresses with '0x'
Browse files Browse the repository at this point in the history
This helps to avoid ambiguity when the address contains only digits 0..9.

Differential Revision: https://reviews.llvm.org/D104909
  • Loading branch information
igorkudrin committed Jun 28, 2021
1 parent c2e6bcb commit e7fffa6
Show file tree
Hide file tree
Showing 19 changed files with 77 additions and 77 deletions.
4 changes: 2 additions & 2 deletions lld/test/ELF/symver.s
Expand Up @@ -75,9 +75,9 @@
# DIS3-COUNT-3: int3
# DIS3-NEXT: callq 0x1390 <foo@plt>
# DIS3-LABEL: <foo@plt>:
# DIS3-NEXT: jmpq *{{.*}}(%rip) # 34a8
# DIS3-NEXT: jmpq *{{.*}}(%rip) # 0x34a8
# DIS3-LABEL: <foo@plt>:
# DIS3-NEXT: jmpq *{{.*}}(%rip) # 34b0
# DIS3-NEXT: jmpq *{{.*}}(%rip) # 0x34b0

## Then, test the interaction with versioned definitions in shared objects.

Expand Down
12 changes: 6 additions & 6 deletions lld/test/ELF/wrap-no-real.s
Expand Up @@ -9,9 +9,9 @@
// RUN: llvm-readelf -s -x .got %t | FileCheck --check-prefix=READELF --implicit-check-not=__real_ %s

// CHECK: <_start>:
// CHECK-NEXT: movq {{.*}}(%rip), %rax # 2021a8
// CHECK-NEXT: movq {{.*}}(%rip), %rbx # 2021a8
// CHECK-NEXT: movq {{.*}}(%rip), %rcx # 2021b0
// CHECK-NEXT: movq {{.*}}(%rip), %rax # 0x2021a8
// CHECK-NEXT: movq {{.*}}(%rip), %rbx # 0x2021a8
// CHECK-NEXT: movq {{.*}}(%rip), %rcx # 0x2021b0

// READELF: 0000000000011000 0 NOTYPE GLOBAL DEFAULT ABS foo
// READELF: 0000000000011010 0 NOTYPE GLOBAL DEFAULT ABS __wrap_foo
Expand All @@ -23,9 +23,9 @@
// RUN: llvm-readelf -s -x .got %t2 | FileCheck --check-prefix=READELF --implicit-check-not=__real_ %s

// CHECK2: <_start>:
// CHECK2-NEXT: movq {{.*}}(%rip), %rax # 2022e0
// CHECK2-NEXT: movq {{.*}}(%rip), %rbx # 2022e0
// CHECK2-NEXT: movq {{.*}}(%rip), %rcx # 2022e8
// CHECK2-NEXT: movq {{.*}}(%rip), %rax # 0x2022e0
// CHECK2-NEXT: movq {{.*}}(%rip), %rbx # 0x2022e0
// CHECK2-NEXT: movq {{.*}}(%rip), %rcx # 0x2022e8

.global _start
_start:
Expand Down
4 changes: 2 additions & 2 deletions lld/test/ELF/x86-64-gotpc-offset.s
Expand Up @@ -7,8 +7,8 @@
# CHECK-NEXT: {{^}} [[#%x,ADDR:]] {{.*}} 00000000

# CHECK: leal {{.*}}(%rip), %eax # {{.*}} <foo>
# CHECK-NEXT: movl {{.*}}(%rip), %eax # [[#ADDR+4]]
# CHECK-NEXT: movq {{.*}}(%rip), %rax # [[#ADDR+1]]
# CHECK-NEXT: movl {{.*}}(%rip), %eax # 0x[[#ADDR+4]]
# CHECK-NEXT: movq {{.*}}(%rip), %rax # 0x[[#ADDR+1]]

## movl foo@GOTPCREL(%rip), %eax
movl 0(%rip), %eax
Expand Down
50 changes: 25 additions & 25 deletions lld/test/ELF/x86-64-gotpc-relax-nopic.s
Expand Up @@ -16,13 +16,13 @@
# DISASM: Disassembly of section .text:
# DISASM-EMPTY:
# DISASM-NEXT: <_start>:
# DISASM-NEXT: 2011c8: adcl {{.*}}(%rip), %eax # 202240
# DISASM-NEXT: addl {{.*}}(%rip), %ebx # 202240
# DISASM-NEXT: andl {{.*}}(%rip), %ecx # 202240
# DISASM-NEXT: cmpl {{.*}}(%rip), %edx # 202240
# DISASM-NEXT: orl {{.*}}(%rip), %edi # 202240
# DISASM-NEXT: sbbl {{.*}}(%rip), %esi # 202240
# DISASM-NEXT: subl {{.*}}(%rip), %ebp # 202240
# DISASM-NEXT: 2011c8: adcl {{.*}}(%rip), %eax # 0x202240
# DISASM-NEXT: addl {{.*}}(%rip), %ebx # 0x202240
# DISASM-NEXT: andl {{.*}}(%rip), %ecx # 0x202240
# DISASM-NEXT: cmpl {{.*}}(%rip), %edx # 0x202240
# DISASM-NEXT: orl {{.*}}(%rip), %edi # 0x202240
# DISASM-NEXT: sbbl {{.*}}(%rip), %esi # 0x202240
# DISASM-NEXT: subl {{.*}}(%rip), %ebp # 0x202240
# DISASM-NEXT: xorl $0x203248, %r8d
# DISASM-NEXT: testl $0x203248, %r15d
# DISASM-NEXT: 201200: adcq $0x203248, %rax
Expand Down Expand Up @@ -65,24 +65,24 @@
# DISASM-PIC: Disassembly of section .text:
# DISASM-PIC-EMPTY:
# DISASM-PIC-NEXT: <_start>:
# DISASM-PIC-NEXT: 1268: adcl {{.*}}(%rip), %eax # 2380
# DISASM-PIC-NEXT: addl {{.*}}(%rip), %ebx # 2380
# DISASM-PIC-NEXT: andl {{.*}}(%rip), %ecx # 2380
# DISASM-PIC-NEXT: cmpl {{.*}}(%rip), %edx # 2380
# DISASM-PIC-NEXT: orl {{.*}}(%rip), %edi # 2380
# DISASM-PIC-NEXT: sbbl {{.*}}(%rip), %esi # 2380
# DISASM-PIC-NEXT: subl {{.*}}(%rip), %ebp # 2380
# DISASM-PIC-NEXT: xorl {{.*}}(%rip), %r8d # 2380
# DISASM-PIC-NEXT: testl %r15d, {{.*}}(%rip) # 2380
# DISASM-PIC-NEXT: 12a0: adcq {{.*}}(%rip), %rax # 2380
# DISASM-PIC-NEXT: addq {{.*}}(%rip), %rbx # 2380
# DISASM-PIC-NEXT: andq {{.*}}(%rip), %rcx # 2380
# DISASM-PIC-NEXT: cmpq {{.*}}(%rip), %rdx # 2380
# DISASM-PIC-NEXT: orq {{.*}}(%rip), %rdi # 2380
# DISASM-PIC-NEXT: sbbq {{.*}}(%rip), %rsi # 2380
# DISASM-PIC-NEXT: subq {{.*}}(%rip), %rbp # 2380
# DISASM-PIC-NEXT: xorq {{.*}}(%rip), %r8 # 2380
# DISASM-PIC-NEXT: testq %r15, {{.*}}(%rip) # 2380
# DISASM-PIC-NEXT: 1268: adcl {{.*}}(%rip), %eax # 0x2380
# DISASM-PIC-NEXT: addl {{.*}}(%rip), %ebx # 0x2380
# DISASM-PIC-NEXT: andl {{.*}}(%rip), %ecx # 0x2380
# DISASM-PIC-NEXT: cmpl {{.*}}(%rip), %edx # 0x2380
# DISASM-PIC-NEXT: orl {{.*}}(%rip), %edi # 0x2380
# DISASM-PIC-NEXT: sbbl {{.*}}(%rip), %esi # 0x2380
# DISASM-PIC-NEXT: subl {{.*}}(%rip), %ebp # 0x2380
# DISASM-PIC-NEXT: xorl {{.*}}(%rip), %r8d # 0x2380
# DISASM-PIC-NEXT: testl %r15d, {{.*}}(%rip) # 0x2380
# DISASM-PIC-NEXT: 12a0: adcq {{.*}}(%rip), %rax # 0x2380
# DISASM-PIC-NEXT: addq {{.*}}(%rip), %rbx # 0x2380
# DISASM-PIC-NEXT: andq {{.*}}(%rip), %rcx # 0x2380
# DISASM-PIC-NEXT: cmpq {{.*}}(%rip), %rdx # 0x2380
# DISASM-PIC-NEXT: orq {{.*}}(%rip), %rdi # 0x2380
# DISASM-PIC-NEXT: sbbq {{.*}}(%rip), %rsi # 0x2380
# DISASM-PIC-NEXT: subq {{.*}}(%rip), %rbp # 0x2380
# DISASM-PIC-NEXT: xorq {{.*}}(%rip), %r8 # 0x2380
# DISASM-PIC-NEXT: testq %r15, {{.*}}(%rip) # 0x2380

.data
.type bar, @object
Expand Down
16 changes: 8 additions & 8 deletions lld/test/ELF/x86-64-plt.s
Expand Up @@ -33,35 +33,35 @@
# DISASM1: Disassembly of section .plt:
# DISASM1-EMPTY:
# DISASM1-NEXT: <.plt>:
# DISASM1-NEXT: 2012e0: pushq 8450(%rip) # 2033e8
# DISASM1-NEXT: jmpq *8452(%rip) # 2033f0
# DISASM1-NEXT: 2012e0: pushq 8450(%rip) # 0x2033e8
# DISASM1-NEXT: jmpq *8452(%rip) # 0x2033f0
# DISASM1-NEXT: nopl (%rax)
# DISASM1-EMPTY:
# DISASM1-NEXT: <bar@plt>:
# DISASM1-NEXT: 2012f0: jmpq *8450(%rip) # 2033f8
# DISASM1-NEXT: 2012f0: jmpq *8450(%rip) # 0x2033f8
# DISASM1-NEXT: pushq $0
# DISASM1-NEXT: jmp 0x2012e0 <.plt>
# DISASM1-EMPTY:
# DISASM1-NEXT: <weak@plt>:
# DISASM1-NEXT: 201300: jmpq *8442(%rip) # 203400
# DISASM1-NEXT: 201300: jmpq *8442(%rip) # 0x203400
# DISASM1-NEXT: pushq $1
# DISASM1-NEXT: jmp 0x2012e0 <.plt>
# DISASM1-NOT: {{.}}

# DISASM2: Disassembly of section .plt:
# DISASM2-EMPTY:
# DISASM2-NEXT: <.plt>:
# DISASM2-NEXT: 1310: pushq 8434(%rip) # 3408
# DISASM2-NEXT: jmpq *8436(%rip) # 3410
# DISASM2-NEXT: 1310: pushq 8434(%rip) # 0x3408
# DISASM2-NEXT: jmpq *8436(%rip) # 0x3410
# DISASM2-NEXT: nopl (%rax)
# DISASM2-EMPTY:
# DISASM2-NEXT: <bar@plt>:
# DISASM2-NEXT: 1320: jmpq *8434(%rip) # 3418
# DISASM2-NEXT: 1320: jmpq *8434(%rip) # 0x3418
# DISASM2-NEXT: pushq $0
# DISASM2-NEXT: jmp 0x1310 <.plt>
# DISASM2-EMPTY:
# DISASM2-NEXT: <weak@plt>:
# DISASM2-NEXT: 1330: jmpq *8426(%rip) # 3420
# DISASM2-NEXT: 1330: jmpq *8426(%rip) # 0x3420
# DISASM2-NEXT: pushq $1
# DISASM2-NEXT: jmp 0x1310 <.plt>
# DISASM2-NOT: {{.}}
Expand Down
8 changes: 4 additions & 4 deletions lld/test/ELF/x86-x32-plt.s
Expand Up @@ -23,17 +23,17 @@
# DISASM: Disassembly of section .plt:
# DISASM-EMPTY:
# DISASM-NEXT: <.plt>:
# DISASM-NEXT: 2011e0: pushq 8346(%rip) # 203280
# DISASM-NEXT: jmpq *8348(%rip) # 203288
# DISASM-NEXT: 2011e0: pushq 8346(%rip) # 0x203280
# DISASM-NEXT: jmpq *8348(%rip) # 0x203288
# DISASM-NEXT: nopl (%rax)
# DISASM-EMPTY:
# DISASM-NEXT: <bar@plt>:
# DISASM-NEXT: 2011f0: jmpq *8346(%rip) # 203290
# DISASM-NEXT: 2011f0: jmpq *8346(%rip) # 0x203290
# DISASM-NEXT: pushq $0
# DISASM-NEXT: jmp 0x2011e0 <.plt>
# DISASM-EMPTY:
# DISASM-NEXT: <weak@plt>:
# DISASM-NEXT: 201200: jmpq *8338(%rip) # 203298
# DISASM-NEXT: 201200: jmpq *8338(%rip) # 0x203298
# DISASM-NEXT: pushq $1
# DISASM-NEXT: jmp 0x2011e0 <.plt>
# DISASM-NOT: {{.}}
Expand Down
8 changes: 4 additions & 4 deletions lld/test/MachO/dso-handle.s
Expand Up @@ -3,13 +3,13 @@

# RUN: %lld -lSystem %t.o -o %t
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
# CHECK: leaq {{.*}} # 100000000
# CHECK-NEXT: leaq {{.*}} # 100000000
# CHECK: leaq {{.*}} # 0x100000000
# CHECK-NEXT: leaq {{.*}} # 0x100000000

# RUN: %lld -dylib %t.o -o %t.dylib
# RUN: llvm-objdump -d --no-show-raw-insn --rebase --section-headers %t.dylib | FileCheck %s --check-prefix=DYLIB-CHECK
# DYLIB-CHECK: leaq {{.*}} # 0
# DYLIB-CHECK-NEXT: leaq {{.*}} # 0
# DYLIB-CHECK: leaq {{.*}} # 0x0
# DYLIB-CHECK-NEXT: leaq {{.*}} # 0x0

# DYLIB-LABEL: Sections:
# DYLIB: __data 00000008 [[#%x,DATA:]] DATA
Expand Down
4 changes: 2 additions & 2 deletions lld/test/MachO/dylink-ordinal.s
Expand Up @@ -10,8 +10,8 @@
# CHECK: callq 0x[[#%x,FOO_OFF:]]
# CHECK-NEXT: callq 0x[[#%x,BAR_OFF:]]

# CHECK: [[#%x,BAR_OFF]]: jmpq {{.*}} # [[#%x,BAR_BIND:]]
# CHECK: [[#%x,FOO_OFF]]: jmpq {{.*}} # [[#%x,FOO_BIND:]]
# CHECK: [[#%x,BAR_OFF]]: jmpq {{.*}} # 0x[[#%x,BAR_BIND:]]
# CHECK: [[#%x,FOO_OFF]]: jmpq {{.*}} # 0x[[#%x,FOO_BIND:]]

# CHECK-LABEL: Lazy bind table:
# CHECK-DAG: __DATA __la_symbol_ptr 0x[[#%x,FOO_BIND]] Foo _foo
Expand Down
2 changes: 1 addition & 1 deletion lld/test/MachO/static-link.s
Expand Up @@ -15,7 +15,7 @@

# CHECK: Disassembly of section __TEXT,__text
# CHECK-LABEL: <_main>:
# CHECK: leaq {{.*}}(%rip), %rsi # [[ADDR]] <_goodbye_world>
# CHECK: leaq {{.*}}(%rip), %rsi # 0x[[ADDR]] <_goodbye_world>

.section __TEXT,__text
.global _main
Expand Down
2 changes: 1 addition & 1 deletion lld/test/MachO/tapi-link.s
Expand Up @@ -14,7 +14,7 @@
# RUN: llvm-objdump --bind --no-show-raw-insn -d -r %t/with-reexport | FileCheck %s

# CHECK: Disassembly of section __TEXT,__text:
# CHECK: movq {{.*}} # [[ADDR:[0-9a-f]+]]
# CHECK: movq {{.*}} # 0x[[ADDR:[0-9a-f]+]]

# CHECK: Bind table:
# CHECK-DAG: __DATA_CONST __got 0x[[ADDR]] pointer 0 libSystem ___nan
Expand Down
6 changes: 3 additions & 3 deletions lld/test/MachO/tlv-dylib.s
Expand Up @@ -17,9 +17,9 @@
# RUN: %lld -lSystem -L%t -ltlv %t/test.o -o %t/test
# RUN: llvm-objdump --bind -d --no-show-raw-insn %t/test | FileCheck %s

# CHECK: movq [[#]](%rip), %rax # [[#%x, FOO:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # [[#%x, BAR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # [[#%x, BAZ:]]
# CHECK: movq [[#]](%rip), %rax # 0x[[#%x, FOO:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # 0x[[#%x, BAR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # 0x[[#%x, BAZ:]]

# CHECK-LABEL: Bind table:
# CHECK-DAG: __DATA __thread_ptrs 0x{{0*}}[[#%x, FOO]] pointer 0 libtlv _foo
Expand Down
12 changes: 6 additions & 6 deletions lld/test/MachO/weak-binding.s
Expand Up @@ -19,12 +19,12 @@
# CHECK-NEXT: {{[0-9a-f]+}} {{[0-9a-f ]*[1-9a-f]+[0-9a-f ]*}}

# CHECK: <_main>:
# CHECK-NEXT: movq [[#]](%rip), %rax # [[#%X,WEAK_DY_GOT_ADDR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # [[#%X,WEAK_EXT_GOT_ADDR:]]
# CHECK-NEXT: leaq [[#]](%rip), %rax # [[#%X,WEAK_INT_GOT_ADDR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # [[#%X,WEAK_TLV_ADDR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # [[#%X,WEAK_DY_TLV_ADDR:]]
# CHECK-NEXT: leaq [[#]](%rip), %rax # [[#%X,WEAK_INT_TLV_ADDR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # 0x[[#%X,WEAK_DY_GOT_ADDR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # 0x[[#%X,WEAK_EXT_GOT_ADDR:]]
# CHECK-NEXT: leaq [[#]](%rip), %rax # 0x[[#%X,WEAK_INT_GOT_ADDR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # 0x[[#%X,WEAK_TLV_ADDR:]]
# CHECK-NEXT: movq [[#]](%rip), %rax # 0x[[#%X,WEAK_DY_TLV_ADDR:]]
# CHECK-NEXT: leaq [[#]](%rip), %rax # 0x[[#%X,WEAK_INT_TLV_ADDR:]]
# CHECK-NEXT: callq 0x{{[0-9a-f]*}}
# CHECK-NEXT: callq 0x{{[0-9a-f]*}}
# CHECK-NEXT: callq 0x{{[0-9a-f]*}}
Expand Down
12 changes: 6 additions & 6 deletions lld/test/MachO/x86-64-reloc-signed.s
Expand Up @@ -12,18 +12,18 @@

# CHECK-LABEL: Disassembly of section
# CHECK: <_main>:
# CHECK-NEXT: movl {{.*}} # [[#S]]
# CHECK-NEXT: movl {{.*}} # 0x[[#S]]
# CHECK-NEXT: callq {{.*}}
# CHECK-NEXT: movl {{.*}} # [[#S + 2]]
# CHECK-NEXT: movl {{.*}} # 0x[[#S + 2]]
# CHECK-NEXT: callq {{.*}}
# CHECK-NEXT: movb {{.*}} # [[#S]]
# CHECK-NEXT: movb {{.*}} # 0x[[#S]]
# CHECK-NEXT: callq {{.*}}
# CHECK: <__not_text>:
# CHECK-NEXT: movl {{.*}} # [[#FOO + 8]]
# CHECK-NEXT: movl {{.*}} # 0x[[#FOO + 8]]
# CHECK-NEXT: callq {{.*}}
# CHECK-NEXT: movl {{.*}} # [[#FOO + 8 + 2]]
# CHECK-NEXT: movl {{.*}} # 0x[[#FOO + 8 + 2]]
# CHECK-NEXT: callq {{.*}}
# CHECK-NEXT: movb {{.*}} # [[#FOO + 8]]
# CHECK-NEXT: movb {{.*}} # 0x[[#FOO + 8]]
# CHECK-NEXT: callq {{.*}}

.section __TEXT,__text
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/X86/tlsdesc-64.s
Expand Up @@ -9,7 +9,7 @@

# SYM: TLS GLOBAL DEFAULT UND a

# CHECK: 0: leaq (%rip), %rax # 7 <{{.*}}>
# CHECK: 0: leaq (%rip), %rax # 0x7 <{{.*}}>
# CHECK-NEXT: 0000000000000003: R_X86_64_GOTPC32_TLSDESC a-0x4
# CHECK-NEXT: 7: callq *(%rax)
# CHECK-NEXT: 0000000000000007: R_X86_64_TLSDESC_CALL a
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/X86/tlsdesc-x32.s
Expand Up @@ -9,7 +9,7 @@

# SYM: TLS GLOBAL DEFAULT UND a

# CHECK: 0: 40 8d 05 00 00 00 00 leal (%rip), %eax # 7 <{{.*}}>
# CHECK: 0: 40 8d 05 00 00 00 00 leal (%rip), %eax # 0x7 <{{.*}}>
# CHECK-NEXT: 00000003: R_X86_64_GOTPC32_TLSDESC a-0x4
# CHECK-NEXT: 7: 67 ff 10 callq *(%eax)
# CHECK-NEXT: 00000007: R_X86_64_TLSDESC_CALL a
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-objdump/X86/disassemble-align.s
Expand Up @@ -10,14 +10,14 @@
# Instructions are expected to be aligned if the instruction in hex is not too long.

# CHECK: 0: c3 |retq
# CHECK-NEXT: 1: 48 8b 05 56 34 12 00 |movq|0x123456(%rip), %rax # 12345e <.text+0x12345e>
# CHECK-NEXT: 1: 48 8b 05 56 34 12 00 |movq|0x123456(%rip), %rax # 0x12345e <.text+0x12345e>
# CHECK-NEXT: 8: 48 b8 54 55 55 55 55 55 55 55|movabsq|$0x5555555555555554, %rax # imm = 0x5555555555555554
# CHECK-NEXT: 12: 8f ea 00 12 4c 02 40 00 00 00 00 |lwpval|$0x0, 0x40(%rdx,%rax), %r15d
# CHECK-NEXT: 1d: 8f ea 00 12 04 25 f0 1c f0 1c 00 00 00 00 |lwpins|$0x0, 0x1cf01cf0, %r15d
# CHECK-NEXT: 2b: ff ff |<unknown>

# NORAW: 0: |retq
# NORAW-NEXT: 1: |movq|0x123456(%rip), %rax # 12345e <.text+0x12345e>
# NORAW-NEXT: 1: |movq|0x123456(%rip), %rax # 0x12345e <.text+0x12345e>
# NORAW-NEXT: 8: |movabsq|$0x5555555555555554, %rax # imm = 0x5555555555555554
# NORAW-NEXT: 12: |lwpval|$0x0, 0x40(%rdx,%rax), %r15d
# NORAW-NEXT: 1d: |lwpins|$0x0, 0x1cf01cf0, %r15d
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-objdump/X86/disassemble-gdtls.s
Expand Up @@ -2,7 +2,7 @@

# CHECK: <PR48901>:
# TODO: Should display data16 prefixes.
# CHECK-NEXT: 0: 66 48 8d 3d 00 00 00 00 leaq (%rip), %rdi # 8 <PR48901+0x8>
# CHECK-NEXT: 0: 66 48 8d 3d 00 00 00 00 leaq (%rip), %rdi # 0x8 <PR48901+0x8>
# CHECK-NEXT: 8: 66 66 48 e8 00 00 00 00 callq 0x10 <PR48901+0x10>
# CHECK-EMPTY:

Expand Down
Expand Up @@ -7,7 +7,7 @@
# EXEC-LABEL: <third>:
# EXEC-NEXT: 4005: e8 12 34 56 78 callq 0x7856741c <data1+0x7856241c>
# EXEC-LABEL: <fourth>:
# EXEC-NEXT: 400a: 8b 05 f0 0f 00 00 movl 4080(%rip), %eax # 5000 <data1>
# EXEC-NEXT: 400a: 8b 05 f0 0f 00 00 movl 4080(%rip), %eax # 0x5000 <data1>

--- !ELF
FileHeader:
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-objdump/llvm-objdump.cpp
Expand Up @@ -1444,7 +1444,7 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj,
PrintTarget = true;
// Do not print real address when symbolizing.
if (!SymbolizeOperands)
FOS << " # " << Twine::utohexstr(Target);
FOS << " # 0x" << Twine::utohexstr(Target);
}
if (PrintTarget) {
// In a relocatable object, the target's section must reside in
Expand Down

0 comments on commit e7fffa6

Please sign in to comment.