Pure-C library output
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
-
- Atari maniac
- Posts: 97
- Joined: Sat Sep 03, 2016 12:20 am
Pure-C library output
I’m working on a GDB stub that’s linkable with TOS programs. How can I configure the project to make a .lib file (like the GEM and TOS libs it includes) I can link with other projects instead of a PRG?
-
- Atari God
- Posts: 1265
- Joined: Sun Aug 03, 2014 5:54 pm
Re: Pure-C library output
I not sure what you are trying to do, but object files in PureC libraries are quite different from other object formats. Basically, every symbol (be it a variable or a function) has its own "section", even if they are combined in a single object file. That is what enables the linker to selectively link only the needed part of an object.
I guess your best option is to take a look at the sources of AHCC, where most of this stuff is handled already.
I guess your best option is to take a look at the sources of AHCC, where most of this stuff is handled already.
-
- Atari maniac
- Posts: 97
- Joined: Sat Sep 03, 2016 12:20 am
Re: Pure-C library output
Huh, okay.
I could never get AHCC to work on my ST - it just freezes up or the menubar doesn’t work or it starts complaining at me in Dutch. No idea. That’s why I’m using good old Pure C.
I could never get AHCC to work on my ST - it just freezes up or the menubar doesn’t work or it starts complaining at me in Dutch. No idea. That’s why I’m using good old Pure C.
-
- Moderator
- Posts: 5250
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: Pure-C library output
Source code please because I would like to have such a stub for use with gcc 
AHCC and Pure C claim to be binary compatible, I never tested this and the last time I was using AHCC, Henk Robbers was very willing to help out and debug issues. He even fixed some things directly in AHCC...

AHCC and Pure C claim to be binary compatible, I never tested this and the last time I was using AHCC, Henk Robbers was very willing to help out and debug issues. He even fixed some things directly in AHCC...
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
-
- Atari maniac
- Posts: 97
- Joined: Sat Sep 03, 2016 12:20 am
Re: Pure-C library output
It really only lets you connect over a 9600bps serial link, read a register dump when a program crashes, read memory, and kill a crashed process so far. I’ll post it on Github once I make some more progress.simonsunnyboy wrote:Source code please because I would like to have such a stub for use with gcc
AHCC and Pure C claim to be binary compatible, I never tested this and the last time I was using AHCC, Henk Robbers was very willing to help out and debug issues. He even fixed some things directly in AHCC...
-
- Moderator
- Posts: 5250
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: Pure-C library output
I am looking forward to it.
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee