ELF and shared objects headache

1 post / 0 new
afxgroup
afxgroup's picture
Offline
Last seen: 2 weeks 2 days ago
Joined: 2011-02-03 15:26
ELF and shared objects headache

I'm getting crazy about my clib2 version and shared objects. and i don't know where to check. Basically i have this problem:

If i compile a program without shared objects everything works correctly.

If i compile with my patched GCC 10 that supports shared objects also for clib2 i have an undefined symbol when the elf.library try to call InitSHLibs.

I get 0x00000000 symbol not available.

The problem however is not in the shared object but in the crtbegin file that is the same with both shared and not shared objects.

Before you ask. Yes. I open Elf library and get the interface correctly in same file (crtbegin) and it is valid (otherwise it will crash also on not shared version)

All other libraries (Exec, DOS and more) are working correctly. For example i can use PrintF just before the crash and it prints the text correctly.

This is the code:

https://pastebin.com/aFr3AL11

Can you give me some hints?