Re: [hatari-devel] Symbol loading for upcoming MINT+ELF program format |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On 30.8.2023 12.43, Vincent Rivière wrote:
Le 30/08/2023 à 00:22, Eero Tamminen a écrit :
Vincent, could you try whether it works for you, as I do not have any
test binaries?
I'm currently quite busy, and I'm not familiar with the Hatari debugger.
Symbols are loaded automatically[1] for currently running program
whenever you invoke Hatari debugger first time for it.
[1] If program is started from GEMDOS HD.
You can get a sample PRG/ELF here:
https://drive.google.com/drive/folders/1ddbWCcGPA4L_F7lN0lH3BfvMAKXYAoGO?usp=drive_link
That's a simple Hello World, not optimized, compiled with:
m68k-atari-mintelf-gcc hello.c -o hello.tos
Thanks!
I had to use breakpoint to avoid program existing immediately, but
everything seems to work fine:
------------------------------------
1. CPU breakpoint condition(s) matched 1 times.
pc = text
Checking: hello.sym
Reading symbols from program 'hello.tos' symbol table...
GCC/MiNT executable, elf symbol table, reloc=0, program flags: FASTLOAD
TTRAMLOAD TTRAMMEM PRIVATE (0x7)
Program section sizes:
text: 0x1af48, data: 0x628, bss: 0x13b8, symtab: 0x24b0
Trying to load ELF symbol table at offset 0x1b5b0...
NOTE: ignored 35 debugging symbols.
NOTE: ignored 8 invalid symbols.
Skipping duplicate address & symbol name checks when autoload is enabled.
Loaded 544 symbols (415 for code) from 'hello.tos'.
....
> m pc
0001549C: 22 7a 00 22 4e d1 4a fc 00 01 af be 7f 45 4c 46 "z."N.J......ELF
....
> symbols code print
0x0001568c T .printexit
0x00019d80 T _isprint
0x00022fa8 T _sprintf
0x00023078 T _vsprintf
0x000231e0 T ___printf_pad
0x00023260 T _vfprintf
0x000273b4 T _buffered_vfprintf
0x00027d56 T ___printf_fp
0x000295a2 T ___printf_fphex
0x0002a23e T ___register_printf_function
0x0002a23e W _register_printf_function
11 CPU TEXT/WEAK symbols (of 415) sorted by address.
....
> d _sprintf
_sprintf:
$00022fa8 4e56 0000 link.w a6,#$0
$00022fac 486e 0010 pea.l $10(a6)
$00022fb0 2f2e 000c move.l $c(a6),-(sp)
$00022fb4 2f2e 0008 move.l $8(a6),-(sp)
$00022fb8 4eb9 0002 3078 jsr $23078.l
$00022fbe 4fef 000c lea.l $c(sp),sp
$00022fc2 4e5e unlk a6
$00022fc4 4e75 rts
_ungetc:
....
------------------------------------
Only thing I'm wondering is why binary has those 8 invalid symbols.
Thorsten?
If necessary, you can easily try the new mintelf toolchain by yourself.
It can be installed side-bi-side with the old one, no fear.
http://vincent.riviere.free.fr/soft/m68k-atari-mintelf/ubuntu.php
- Eero