<div dir="ltr"><div>As far as I'm aware, there is no equivalent option in llvm-objdump currently unfortunately. We should add it. Could you file a bug against llvm-objdump to that effect?</div><div><br></div><div>James<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 16 Jun 2020 at 22:27, Pat Pannuto via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi folks,<div><br></div><div>As part of our build, the Tock project uses remap-path-prefix [1] to create a reproducible build. This means that the paths inside of built artifacts are not full source paths. When we later attempt to produce a listings file, the source mapping fails. The result is many copies of this recently merged warning [2]:</div><div><br></div><div> llvm-objdump: warning: '/Volumes/code/helena-project/tock/target/thumbv7em-none-eabi/release/hail.elf': failed to find source chips/sam4l/src/<a href="http://eic.rs" target="_blank">eic.rs</a><br></div><div><br></div><div>It looks like GNU objdump provides a --prefix option to address this exact problem [3]:</div><div><br></div><div><dl><dt><b> --prefix=</b><i>prefix</i>
</dt><dd> Specify <i>prefix</i> to add to the absolute paths when used with <b>-S</b>. </dd></dl></div><div><br></div><div>But I can't find an equivalent mechanism in llvm-objdump.</div><div><br></div><div>What's the correct way to point objdump to source files during disassembly?</div><div><br></div><div>To reproduce the problem, `make lst` in any of the boards for the Tock Operating System (e.g. <a href="https://github.com/tock/tock/tree/master/boards/hail" target="_blank">https://github.com/tock/tock/tree/master/boards/hail</a> ) will produce many missing file warnings.</div><div><br></div><div>Thanks for your help!</div><div><br></div><div>-Pat</div><div><br></div><div>[1] <a href="https://doc.rust-lang.org/1.24.0/unstable-book/compiler-flags/remap-path-prefix.html" target="_blank">https://doc.rust-lang.org/1.24.0/unstable-book/compiler-flags/remap-path-prefix.html</a></div><div>[2] <a href="https://reviews.llvm.org/D62462" target="_blank">https://reviews.llvm.org/D62462</a></div><div>[3] <a href="https://linux.die.net/man/1/objdump" target="_blank">https://linux.die.net/man/1/objdump</a></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>