Yes, that is exactly what I just created a tool for!

https://github.com/platform-system-interface/p9aout2elf

It converts Plan 9 a.out to ELF including text symbols for a start, so far
for amd64 (which I think you are on?), resulting in 32-bit ELF (that is
what I got from Ron as a fixture) and RISC-V resulting in 64-bit ELF.

Please let me know if you run into issues. :)

On Thu, Jun 5, 2025 at 7:15 PM Paul Lalonde <[email protected]>
wrote:

> I'm debugging Nix's reboot code.  The good news is that a straight reboot
> now works.  The bad news is that jumping to a new kernel does not.  It
> looks like it's dying in the reboot trampoline, which points to some
> mis-managed expectation about machine state (page table, gdt?).
>
> I'm trying to debug this with qemu and gdb, but though the elf generated
> by 'mk 9pc64.elf' is enough to run gdb and connect to the qemu-hosted
> kernel, it has no debug symbols.  Operating with addresses gleaned from a
> .lst file is less than pleasant.
>
> Is there a way to generate symbols for functions in the .elf?
>
> Thanks,
>   Paul
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/Tf354217cf219d308-M62a7f89df970d81a846c9950>
>

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tf354217cf219d308-Mc15c5f1b47894dfc0efd6d10
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to