ld segfault when building objc source with pthread
Nick Clifton
nickc@redhat.com
Tue Mar 30 16:08:00 GMT 2004
Hi Rogelio,
> gnu ld crashes when i try to build a threaded objc program.
Bugs and problems with GNU ld should be reported to the binutils
mailing list (bug-binutils@gnu.org) rather than the gcc mailing list.
> How do i pinpoint the cause?
The most common method is to use a debugger such as GDB. If that does
not work then the most likely cause is a memory corruption bug which
is corrupting the stack and so preventing GDB from being able to give
any useful information. In such cases enabling a debugging memory
allocator can be useful. If you are running under Linux then setting
the environment variable MALLOC_CHECK_ will do this.
Failing that, then the good old stand-by method of adding print
statements to the code often works. Starting with main() in
ld/ldmain.c, add fprintf(stderr,...) statements to the code, rebuild/
reinstall the linker and narrow down where the problem occurs.
An alternative approach is to produce a *small* testcase and post this
to the binutils mailing list, asking for help.
Cheers
Nick
More information about the Gcc
mailing list