This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

"ld: fatal: relocations remain against allocatable but non-writable sections" Error


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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]