2 msgWG: g++ 3.01 on HP-UX 11.0, stack size too large?
1 msgsame compiler image / multiple os versions
2 msgGCC 3.2 fails to successfully create a shared l...
1 msgsignal 11 when compiling gcc
1 msgaggregate initializer
2 msgCan I compile a C program targeting a Java Virt...
1 msgGCOV: problems with switch-structures?
1 msgMake: Filtering prerequisites
2 msgI am not able to compile a shared library with ...
1 msgChange the default spec file - Gcc-4.1.0 .
1 msgrodata - address is out of bounds
1 msgcross compiler; x86_64 freebsd -> i386 freeb...
4 msgBuild gcc 4.1.0 so i can target both x86 and AMD64
1 msgAdding GCC support to a new 8 bit micro from La...

Diagnosing linker errors?
\ walt (31 Mar 2006)

1 msgAssembler error: file already allocated
2 msgStandard builtin/macros
3 msgDebugging G++
2 msgDynamic Library (shared libraries)
4 msgno fortran compiler
Subject:Diagnosing linker errors?
Group:Gcc-help
From:walt
Date:31 Mar 2006


I'm trying to figure out why I can't build Thunderbird with gcc 3.4.5
but I don't know enough about how linking works.

I'm getting this linker error with gcc 3.4.5 but not with 3.3.6:
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld:
../../content/xul/templates/src/libgkconxultmpl_s.a(nsXULTemplateBuilder.o)(.gnu .linkonce.t._ZN8nsTArrayIP18nsTemplateQuerySetEC1Ev+0x10): unresolvable relocation against symbol `nsTArray_base::sEmptyHdr'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output

That problem symbol is defined in the object nsTArray.o, so I tried
comparing that file generated by the two different compilers, and I
noticed at least one difference.

#objdump -rC nsTArray.o | grep EmptyHdr
00000010 R_386_GOTOFF nsTArray_base::sEmptyHdr
^^^
In the version generated by gcc 3.3.6 that GOTOFF is replaced by GOT32.

Could that difference be causing my link error? If so, how would I
go about finding out why this difference happens?

Thanks for any clues!




© 2004-2008 readlist.com