<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hello</div><div>i see that the address of specific symbol are not the same between llvm-objdump and objdump.</div><div><br></div><div>The code:</div><div>---</div><div><div>#include <stdio.h></div><div><br></div><div>int machin = 42;</div><div><br></div><div>int</div><div>main ()</div><div>{</div><div> printf("Hello : %d\n", machin);</div><div> return 0;</div><div>}</div></div><div>----</div><div><br></div><div>compile command:</div><div>clang hello1.c -o hello1</div><div><br></div><div><br></div><div>And the address of the symbol of the global variable "machin":</div><div><div>[ Fri Mar 08 - 22:58:36 ][ wwolff@hostname ]</div><div>~/hello_stuff</div><div>$ objdump hello1 -t -g | grep machin</div><div>0000000000601020 g O .data<span class="Apple-tab-span" style="white-space:pre"> </span>0000000000000004 machin</div><div><br></div><div>[ Fri Mar 08 - 22:58:40 ][ wwolff@hostname ]</div><div>~/hello_stuff</div><div>$ llvm-objdump hello1 -t -g | grep machin</div><div>00c02030 g .data<span class="Apple-tab-span" style="white-space:pre"> </span>00000004 machin</div></div><div><br></div><div>It's normal??</div><div><br></div><div>I see the same difference with llvm-nm and nm.</div><div><br></div><div>Best Regards</div><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><b>--</b></div><div><b>Willy WOLFF</b></div><div style="font-weight: normal; "><br></div></div></span></div></span></div></div></div><br class="Apple-interchange-newline">
</div>
<br></div></div></div><br></body></html>