<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">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><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></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">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">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">https://reviews.llvm.org/D62462</a></div><div>[3] <a href="https://linux.die.net/man/1/objdump">https://linux.die.net/man/1/objdump</a></div></div>