Making functions visible from a shared library

Szabolcs Borbely szabolcs_borbely@hotmail.com
Tue May 15 10:00:00 GMT 2001


I have a problem making functions visible from a shared library, so when the 
library is loaded from an executable --with dlopen()-- it could call them 
via a pointer.
I have tried to recompile with g++ and link with ld, but after dlopen() I 
got the error "PT_LOAD segments not page-aligned".

Does anyone have an idea what this could be? Or mey it be simply a 
compiler/linker switch?

As a reference here is my compiler command:
g++ -g -c -v -nostdlib -lgcc -I/home/headers -D unix -o <lib_name>.o 
<lib_name>.c

And linker command:
ld -nostdlib -export-dynamic -shared -lgcc -lm <obj_to_link>.o -lm 
<obj_to_link2>.o  -o <lib_name> <lib_name>.o


Thank you all.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



More information about the Gcc-help mailing list