Re: [hatari-devel] Patch to enhance symbol names of Pure-C executables

[ Thread Index | Date Index | More Archives ]

Hi Thorsten,

Sorry this took so long (WFH makes me avoid
computers at home nowadays)...

On 4.4.2021 2.13, Eero Tamminen wrote:
On 31.3.2021 21.25, Thorsten Otto wrote:
On Mittwoch, 31. März 2021 18:44:01 CEST Thorsten Otto wrote:
I'll try to come up with a new serious
of patches that moves the common code first.

And here we go. Common code has been moved to
separate file, so the (new) patch  affects both
the tool and Hatari's symbol command.

I pushed your changes few days ago.


I'm thinking that options should go also to
common code, and internal debugger should have
the same options as external too, so that common
code is exactly the same for both cases.

I'll look into that in next few days and hopefully
get rid of all the ifdefs.  If you have additional
changes or refactored patches, please mail them

And did these and few additional improvements
to the shared code.

I've also added a heuristic to autodetect
address offsets, hope that works in all cases.

Unfortunately it was completely broken...

Checking DATA & BSS symbols against TEXT len is
a good idea, I like it.
For testing purposes, you can download
an ORCS.PRG with debug information from

Great, thanks!

....even with the above test-case.

But I've now hopefully pushed fixes to all
the issues.

I'm thinking of whether Hatari could have some
kind of automated testing for correct symbol loading from binaries, but that would require
adding several binaries (having different types
of symbol tables) to Hatari repo.

Thomas, any comments on that?

Btw. opendune binaries:

Are an example of DRI symbols which need section
specific offsets.  I have no idea what Nanard uses
to build it though.

	- Eero

On 31.3.2021 19.44, Thorsten Otto wrote:
On Mittwoch, 31. März 2021 14:49:58 CEST Eero Tamminen wrote:
you should be able to use about any self-cmpiled
code, just add debug information when compiling
and linking.

I don't have Pure-C (AFAIK it's still proprietary).

AHCC version probably works also with PC, after
adding suitable PRJ file

AHCC does not produce the debug information that this patch uses. But
IIRC, it
uses at least the 22 name extension, so it might not be that
critical. The
main problem with Pure-C is, that a lot of symbols are ambiguous
after being
truncated to 8 characters.

I just meant that "somebody" with Pure-C providing
Pure-C PRJ file (and testing that it works) for
the Hatari NatFeats example code would be great.

     - Eero

Mail converted by MHonArc 2.6.19+