Pure-C library output

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Post Reply
LuigiThirty
Atari maniac
Atari maniac
Posts: 97
Joined: Sat Sep 03, 2016 12:20 am

Pure-C library output

Post by LuigiThirty »

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?

ThorstenOtto
Atari God
Atari God
Posts: 1096
Joined: Sun Aug 03, 2014 5:54 pm

Re: Pure-C library output

Post by ThorstenOtto »

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.

LuigiThirty
Atari maniac
Atari maniac
Posts: 97
Joined: Sat Sep 03, 2016 12:20 am

Re: Pure-C library output

Post by LuigiThirty »

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.

simonsunnyboy
Moderator
Moderator
Posts: 5228
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Pure-C library output

Post by simonsunnyboy »

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...
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

LuigiThirty
Atari maniac
Atari maniac
Posts: 97
Joined: Sat Sep 03, 2016 12:20 am

Re: Pure-C library output

Post by LuigiThirty »

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...
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
Moderator
Moderator
Posts: 5228
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Pure-C library output

Post by simonsunnyboy »

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

Post Reply

Return to “C / PASCAL etc.”