Mail Archives: cygwin/1998/10/22/13:37:46
From: | ckirgios AT ajboggs DOT com (Chris Kirgios)
|
Subject: | "ld: fatal: relocations remain against allocatable but non-writable sections" Error
|
22 Oct 1998 13:37:46 -0700
: | |
Message-ID: | <001b01bdfd38$a27c8f70$22ba6ec6.cygnus.gnu-win32@athena.ajboggs.com>
|
Mime-Version: | 1.0
|
To: | <gnu-win32 AT cygnus DOT com>
|
I have a problem linking my code using GNU g++. On Solaris, I create a bunch
of shared libraries using g++. One of the libraries used to be a C library
that I 'converted' to ANSI C. It contains some global variables (I am not
sure this is relevant but ...).
Whenever I link that library with
g++ -shared -o
I get the following:
g++ -g -shared -o libiSearch.so fields.o heap.o dia.o plurals.o se.o
Text relocation remains referenced
against symbol offset in file
<unknown> 0x560 se.o
<unknown> 0x55c se.o
<unknown> 0x558 se.o
<unknown> 0x554 se.o
<unknown> 0x564 se.o
<unknown> 0x568 se.o
<unknown> 0x548 se.o
<unknown> 0x544 se.o
<unknown> 0x540 se.o
<unknown> 0x53c se.o
<unknown> 0x56c se.o
<unknown> 0x570 se.o
etc
ld: fatal: relocations remain against allocatable but non-writable sections
When I link statically everything is OK. If I use
ld -G
the library gets created but my executables crash because it seems that a
bunch of const String& variables defined in another library have not been
initialized (they are null or bad references).
I have been strugling with this for a couple of days and I am running out of
ideas. Anyone who might know or might have experienced similar problems?
Thanks a lot for your help.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -