Skip to content

Add symbols to disassembly listing #70

@ghaerr

Description

@ghaerr

Hello @mfld-fr,

I was successful in a quick first pass at enhancing the disassembler to convert address values to symbol names, including private static symbols in the ELKS kernel. For instance, here's a trace of ELKS ROM kernel returning from a timer interrupt. You can see the scheduler timer list being checked and then the PIC EOI and register restore, with symbols from C and ASM. This greatly enhances the ability to see what is going on:

Screen Shot 2021-05-15 at 7 40 34 PM

I haven't added the far text segment or data segment symbol lookup yet. There might be some issues determining when a data reference should be converted to a data symbol or not. The current implementation is a hack that uses a conversion of an ia16-elf-nm namelist of the ELF system file (before elf2elks conversion) to C and compiles it in, which isn't really what we want. I was thinking of a -M mapfile option or something like that, along with the -f system image. We will need a way to specify the near vs far code segment, which I haven't thought of how to handle yet.

Is this something you are interested in? I've produced this with a 20-line hack, but it needs work and my hands are a bit full over at ELKS right now. You probably have your own ideas about how this should be implemented.

Thank you!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions