Pure-C library output

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

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

LuigiThirty
Atari freak
Atari freak
Posts: 74
Joined: Sat Sep 03, 2016 12:20 am

Pure-C library output

Postby LuigiThirty » Wed Feb 07, 2018 1:06 am

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
Captain Atari
Captain Atari
Posts: 242
Joined: Sun Aug 03, 2014 5:54 pm

Re: Pure-C library output

Postby ThorstenOtto » Wed Feb 07, 2018 1:33 am

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 freak
Atari freak
Posts: 74
Joined: Sat Sep 03, 2016 12:20 am

Re: Pure-C library output

Postby LuigiThirty » Wed Feb 07, 2018 4:54 am

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.

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

Re: Pure-C library output

Postby simonsunnyboy » Wed Feb 07, 2018 4:22 pm

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 freak
Atari freak
Posts: 74
Joined: Sat Sep 03, 2016 12:20 am

Re: Pure-C library output

Postby LuigiThirty » Wed Feb 07, 2018 6:08 pm

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.

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

Re: Pure-C library output

Postby simonsunnyboy » Wed Feb 07, 2018 6:54 pm

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


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 1 guest