Pat Pannuto via llvm-dev
2020-Jun-16 21:12 UTC
[llvm-dev] How to fixup source paths during objdump disassembly?
Hi folks, 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]: llvm-objdump: warning: '/Volumes/code/helena-project/tock/target/thumbv7em-none-eabi/release/hail.elf': failed to find source chips/sam4l/src/eic.rs It looks like GNU objdump provides a --prefix option to address this exact problem [3]: * --prefix=**prefix* Specify *prefix* to add to the absolute paths when used with *-S*. But I can't find an equivalent mechanism in llvm-objdump. What's the correct way to point objdump to source files during disassembly? To reproduce the problem, `make lst` in any of the boards for the Tock Operating System (e.g. https://github.com/tock/tock/tree/master/boards/hail ) will produce many missing file warnings. Thanks for your help! -Pat [1] https://doc.rust-lang.org/1.24.0/unstable-book/compiler-flags/remap-path-prefix.html [2] https://reviews.llvm.org/D62462 [3] https://linux.die.net/man/1/objdump -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200616/f7a1df04/attachment.html>
James Henderson via llvm-dev
2020-Jun-17 15:12 UTC
[llvm-dev] How to fixup source paths during objdump disassembly?
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? James On Tue, 16 Jun 2020 at 22:27, Pat Pannuto via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi folks, > > 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]: > > llvm-objdump: warning: > '/Volumes/code/helena-project/tock/target/thumbv7em-none-eabi/release/hail.elf': > failed to find source chips/sam4l/src/eic.rs > > It looks like GNU objdump provides a --prefix option to address this exact > problem [3]: > > * --prefix=**prefix* Specify *prefix* to add to the absolute paths > when used with *-S*. > > But I can't find an equivalent mechanism in llvm-objdump. > > What's the correct way to point objdump to source files during disassembly? > > To reproduce the problem, `make lst` in any of the boards for the > Tock Operating System (e.g. > https://github.com/tock/tock/tree/master/boards/hail ) will produce many > missing file warnings. > > Thanks for your help! > > -Pat > > [1] > https://doc.rust-lang.org/1.24.0/unstable-book/compiler-flags/remap-path-prefix.html > [2] https://reviews.llvm.org/D62462 > [3] https://linux.die.net/man/1/objdump > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200617/e25121d2/attachment.html>
Sterling Augustine via llvm-dev
2020-Jun-17 15:32 UTC
[llvm-dev] How to fixup source paths during objdump disassembly?
llvm-symbolizer has --relativenames, which is close. It would only take a bit of plumbing to add that to llvm-objdump. On Wed, Jun 17, 2020 at 8:12 AM James Henderson via llvm-dev < llvm-dev at lists.llvm.org> wrote:> 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? > > James > > On Tue, 16 Jun 2020 at 22:27, Pat Pannuto via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi folks, >> >> 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]: >> >> llvm-objdump: warning: >> '/Volumes/code/helena-project/tock/target/thumbv7em-none-eabi/release/hail.elf': >> failed to find source chips/sam4l/src/eic.rs >> >> It looks like GNU objdump provides a --prefix option to address this >> exact problem [3]: >> >> * --prefix=**prefix* Specify *prefix* to add to the absolute >> paths when used with *-S*. >> >> But I can't find an equivalent mechanism in llvm-objdump. >> >> What's the correct way to point objdump to source files during >> disassembly? >> >> To reproduce the problem, `make lst` in any of the boards for the >> Tock Operating System (e.g. >> https://github.com/tock/tock/tree/master/boards/hail ) will produce many >> missing file warnings. >> >> Thanks for your help! >> >> -Pat >> >> [1] >> https://doc.rust-lang.org/1.24.0/unstable-book/compiler-flags/remap-path-prefix.html >> [2] https://reviews.llvm.org/D62462 >> [3] https://linux.die.net/man/1/objdump >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200617/7d5974e3/attachment.html>