Name: Anonymous 2008-03-10 12:56
compile AND link a shared object using gcc /tl;dr
i have this program which dynamically loads modules, shared objects, for functionality, and so far i've used a Makefile that compiles in one rule, gcc, and links in another rule, ld
but now i just added a module that links to perl libs and i need to compile it EXACTLY like my perl interpreter, which was compiled AND linked using gcc, and i forgot how i do that
why isn't this working?
i get this error
most modules don't have an _init function but some that need to load something into memory when dlopen is executed DO, and that's where the gmake process gets stuck, because of this weird crti.o thing, i used to compile and link using gcc but then i switched to two rules and now i don't remember how i did it or why this isn't working, no i don't need to link with crt0 or anything like that because i never did before
i have this program which dynamically loads modules, shared objects, for functionality, and so far i've used a Makefile that compiles in one rule, gcc, and links in another rule, ld
but now i just added a module that links to perl libs and i need to compile it EXACTLY like my perl interpreter, which was compiled AND linked using gcc, and i forgot how i do that
why isn't this working?
gcc -Wall -pedantic -ansi -DSETPROCTITLE -Isrc -I.. -rpath . -L. -L../.. -lbice -fPIC -shared -Wl,-soname,islam.so -o modules/islam.so -lc src/mods/islam.ci get this error
/var/tmp//ccr5zUiZ.o(.text+0xd0): In function `_init':
: multiple definition of `_init'
/usr/lib/crti.o(.init+0x0): first defined heremost modules don't have an _init function but some that need to load something into memory when dlopen is executed DO, and that's where the gmake process gets stuck, because of this weird crti.o thing, i used to compile and link using gcc but then i switched to two rules and now i don't remember how i did it or why this isn't working, no i don't need to link with crt0 or anything like that because i never did before