Problems with refernces to __builtin_xxx linking a shared library

Michael Skriver
Mon Feb 14 02:18:00 GMT 2000

I'm  having problems with refernces to __builtin_new,
__builtin__pure_virtual etc. when I'm building a shared c++ library with
the options -shared -nostartfiles -nodefaultlibs.

Here is the actual return of the compile
gcc -shared -nostartfiles -nodefaultlibs -o
Text relocation remains                         referenced
    against symbol                  offset      in file
test::test(int)                     0x20        /var/tmp/cc5sKHSk.o
terminate(void)                     0xa0        /var/tmp/cc5sKHSk.o
__builtin_delete                    0x50        /var/tmp/cc5sKHSk.o
__builtin_delete                    0x78        /var/tmp/cc5sKHSk.o
__builtin_new                       0x8         /var/tmp/cc5sKHSk.o
__throw                             0x98        /var/tmp/cc5sKHSk.o
__throw                             0x38        /var/tmp/cc5sKHSk.o
ld: fatal: relocations remain against allocatable but non-writable
collect2: ld returned 1 exit status

Is it possible to provide these functions in seperate library linked
against this one? Getting rid off _delete and _new is easy by doing
overloading, but the throw and pure vitual calls are driving me nuts :).
How do i fool the linker to accept other, than the standard, rutines for
them. Is there any documentation on these rutines ?

Michael Skriver

More information about the Gcc mailing list