<div dir="ltr"><font face="courier new, monospace"><br><br>On Tue, Aug 26, 2014 at 1:17 PM, Kevin Enderby <<a href="mailto:enderby@apple.com" target="_blank">enderby@apple.com</a>> wrote:<br>> For me, operands of -3, -5 and 1 are of little use.<br>
<br>Agreed. <div class="gmail_default" style="display:inline">This annoyance started me down this whole path.</div><br>
<br>><br>> Also if I’m printing symbolic operands like “bar” I don’t want to see the<br>> address of bar or the displacement in that case. Basically I want to see as<br>> close to real assembly code as possible.<br>
<br><br><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">Sounds right to me. In '-bare' you get the address, otherwise you get the symbol.</div><br><br><br><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">
> </div>We use things<br>
> like 1f, 2b or L21 because we break sections into “atoms” at the symbol<br><br><br>Adding 'f' and 'b' style branches to the test case<div class="gmail_default" style="font-family:'courier new',monospace;display:inline">
, but GNU objdump shows these as an address plus nearest label + offset</div></font><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">.</div><div><font face="courier new, monospace"><br>
$ cat labeltest.s<br>.text<br>foo:<br> nop<br>bar:<br>bum:<br> nop<br> jmp bar<br> jmp bum<br> jmp 1f<br> nop<br>1:<br>
nop<br> jmp 1b<br><br>$llvm-objdump -d -symbolize x86_labeltest.o<br><br>x86_labeltest.o: file format ELF32-i386<br><br>Disassembly of section .text:<br>foo:<br> 0: 90 nop<br>
<br>bum:<br> 1: 90 nop<br> 2: eb fd jmp -3<br> 4: eb fb jmp -5<br> 6: eb 01 jmp 1<br>
8: 90 nop<br> 9: 90 nop<br> a: eb fd jmp -3<br><br>$ objdump -dw x86_labeltest.o<br>
<br>x86_labeltest.o: file format elf32-i386<br><br><br>Disassembly of section .text:<br><br>00000000 <foo>:<br> 0: 90 nop<br><br>00000001 <bar>:<br> 1: 90 nop<br> 2: eb fd jmp 1 <bar><br>
4: eb fb jmp 1 <bar><br> 6: eb 01 jmp 9 <bar+0x8><br> 8: 90 nop<br> 9: 90 nop<br> a: eb fd jmp 9 <bar+0x8><br>
<br><br><br></font><br></div></div>