Working shared ELF libraries in DJGPP

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Sam the man

Working shared ELF libraries in DJGPP

Post by Sam the man »

Hello everyone!

Does anyone know how to create shared ELF libraries in DJGPP that actually works?
I remember before that i downloaded the elf-binutils for DJGPP, but they didn't work for shared libraries. First there was som error saying __GLOBAL_OFFSET_TABLE couldn't be founded. I founded the solution to this on some page so at least it seemed to work but when I checked in the .so files I created they where all fucked up (at least the relocation entries).
What to do? I would be very great grateful if someone could help me here...
AR

Re:Working shared ELF libraries in DJGPP

Post by AR »

It would be easier if you just use Cygwinand a proper cross compiler.
Sam the man

Re:Working shared ELF libraries in DJGPP

Post by Sam the man »

It would be easier if you just use Cygwin and a proper cross compiler.
Yes, but I want to use dos to test my os on real hardware (dos is very fast to boot as you might know...)
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Working shared ELF libraries in DJGPP

Post by Candy »

Sam the man wrote:
It would be easier if you just use Cygwin and a proper cross compiler.
Yes, but I want to use dos to test my os on real hardware (dos is very fast to boot as you might know...)
You can try to make a 32-bit crosscompiler with DJGPP, although I'm not at all sure how/whether that will work. You'll need unmodified sources to GCC, and then compile that with DJGPP. If I'm thinking straight you can then use the resulting binary as a normal compiler under DOS, except that it can then no longer create DOS binaries but only 32-bit files.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Working shared ELF libraries in DJGPP

Post by Pype.Clicker »

well, the only problem i could foresee with using DJGPP to build a cross-compiler will be the time it'll require. It won't be fast under DOS (probably take the night long) and it will even get worse under windows (due to the double emulation required to run 32 bits program in an emulated environment that's there for 16 bits compatibility).

Seriously, you should consider using cygwin instead, as we all did the day we discovered cygwin. All the code you gather from DJGPP tutorials will run almost unmodified under cygwin and you'll be set up for the future.
Crazed123

Re:Working shared ELF libraries in DJGPP

Post by Crazed123 »

Or use gcc in its native environment ;D.
Post Reply