[PATCH] D75631: [llvm-objdump] Fix reliability of call target disassembling

Dave Bozier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 08:37:25 PDT 2020


davidb added inline comments.


================
Comment at: lld/test/ELF/pre_init_fini_array.s:140-145
+// DISASM-NEXT:   callq   {{.*}} <_start+{{.*}}>
+// DISASM-NEXT:   callq   {{.*}} <_start+{{.*}}>
+// DISASM-NEXT:   callq   {{.*}} <_start+{{.*}}>
+// DISASM-NEXT:   callq   {{.*}} <_start+{{.*}}>
+// DISASM-NEXT:   callq   {{.*}} <_start+{{.*}}>
+// DISASM-NEXT:   callq   {{.*}} <_start+{{.*}}>
----------------
thopre wrote:
> Suggestion welcome on how to get better output here. I tried replacing the call by leaq with some .align here and there to avoid overlap of __start and __end symbols but that only works for GNU objdump, llvm-objdump doesn't print the target of lea.
Should be an lea right? from my host libc. Changing it to lea will make this test unrelated to your fix, as that only does symbol lookups for calls/branches.

```
   2:	4c 8d 3d 00 00 00 00 	lea    0x0(%rip),%r15        # 9 <__libc_csu_init+0x9>
			5: R_X86_64_PC32	__preinit_array_start-0x4
   9:	41 56                	push   %r14
   b:	4c 8d 35 00 00 00 00 	lea    0x0(%rip),%r14        # 12 <__libc_csu_init+0x12>
			e: R_X86_64_PC32	__preinit_array_end-0x4
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75631/new/

https://reviews.llvm.org/D75631





More information about the llvm-commits mailing list