|
Author | Thread |
---|---|
Chris |
Published: 2010/8/23 23:21 Updated:
2010/8/23 23:22
|
Amigans Defender
Joined: 11/17/2006
From: England
Comments: 3409
|
Re: clib2 1.205 Update
Quote:
- Added support for ELF shared objects and libraries. This is implemented through constructor/destructor functions, which means that you can use this functionality even in Amiga Exec style shared libraries, with the proper library initialization code to invoke the constructor/destructor functions for you. OK... so this means we can dynamically link clib2 programs to shared objects built with newlib? I thought that was impossible. Can anybody divulge what the "proper library initialization code to invoke the constructor/destructor functions" is if we want to call shared objects from shared libraries? Never had any luck with this with newlib, maybe it is the same issue, or maybe using clib2 with this code will work instead. |
joerg |
Published: 2010/8/24 2:12 Updated:
2010/8/24 2:12
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1928
|
Re: clib2 1.205 Update
Quote:
OK... so this means we can dynamically link clib2 programs to shared objects built with newlib? Quote: Can anybody divulge what the "proper library initialization code to invoke the constructor/destructor functions" is if we want to call shared objects from shared libraries? |
Thematic |
Published: 2010/8/24 19:40 Updated:
2010/8/24 19:40
|
Quite a regular
Joined: 02/27/2007
From: Gravity well
Comments: 737
|
Re: clib2 1.205 Update
How would I tell newlib .so and clib2 .so files apart?
|
joerg |
Published: 2010/8/24 23:01 Updated:
2010/8/24 23:05
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1928
|
Re: clib2 1.205 Update
Quote:
How would I tell newlib .so and clib2 .so files apart? No idea what the soname of the shared clib2 libc is, the archive on sourceforge.net seems to be incomplete. It doesn't include any shared objects at all and the shcrtbegin.o and shcrtend.o required for building shared objects are missing as well. |
spotUP |
Published: 2010/8/24 23:36 Updated:
2010/8/24 23:36
|
Just can't stay away
Joined: 11/26/2006
From:
Comments: 1492
|
Re: clib2 1.205 Update
i smell trouble.
what if a game needs libsdl.so for clib2, and i already have libsdl.so for newlib in sobjs? are they all stored in sobjs: ? |
joerg |
Published: 2010/8/25 0:29 Updated:
2010/8/25 0:50
|
Just can't stay away
Joined: 12/01/2006
From: Germany
Comments: 1928
|
Re: clib2 1.205 Update
Quote:
what if a game needs libsdl.so for clib2, and i already have libsdl.so for newlib in sobjs? You can link programs using libSDL with -mcrt=clib2 -lSDL as usual, the linker loads libSDL.so from the SDK clib2 directory, but the created executables using it load it using it's soname from SOBJS: instead. In SOBJS: the shared objects have to be stored with their soname anyway (and there never should have been any soft links in SOBJS:), in this example SOBJS:libSDL-1.2-clib2.so. |
corto |
Published: 2010/8/25 18:32 Updated:
2010/8/25 18:32
|
Not too shy to talk
Joined: 03/30/2007
From:
Comments: 309
|
Re: clib2 1.205 Update
I was recently wondering why we still keep clib2.
The new support for shared object is certainly nice but does it worth having it knowing that the default switched to newlib ? We've seen recently how it is hard to hard full libs with static libs and shared object in a same package. I personaly don't think there will be many clib2 shared objects. My fear is that will add more confusion. Is there an interest in pushing up clib2 shared objects ? |
kas1e |
Published: 2010/8/26 6:57 Updated:
2010/8/26 6:57
|
Home away from home
Joined: 09/11/2007
From: Russia
Comments: 9109
|
Re: clib2 1.205 Update
Corto, i have the same questions. Dunno for what we need clib2 at all for now ? (i am not expert, so just curios). Did it have any advantages in compare with newlib ?
|
centaurz |
Published: 2010/8/31 13:51 Updated:
2010/8/31 13:51
|
Just popping in
Joined: 09/03/2007
From: France
Comments: 144
|
Re: clib2 1.205 Update
@kas1e
We still need a minimum support on clib2 for programs which sticked to it (and also if you don't want to rely on a shared library for C runtime). I can remember several libs that did not compile out of the box when linked with newlib (was a while ago, maybe it has changed since then). Adding support for shared objs is another question, it could add confusion. |