delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/25/15:21:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sat, 25 Oct 2003 21:27:01 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Reply-To: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <93206252355.20031025212701@familiehaase.de>
To: cygwin AT cygwin DOT com
Subject: binutils: Strange ld error: Error: 0-bit reloc in dll
MIME-Version: 1.0

Hallo,

I'm getting a 'I've never seen before' ld error:
 Error: 0-bit reloc in dll

Libtool issues the link command like this:
gcc -shared \
 $(OBJECTS) \
 -L/usr/lib \
 -L/usr/X11R6/lib $(LIBS) \
 -Wl,--export-dynamic \
 -Wl,--export-dynamic \
 -o .libs/cyggucharmap-3.dll \
 -Wl,--image-base=0x10000000 \
 -Wl,--out-implib,.libs/libgucharmap.dll.a
Error: 0-bit reloc in dll
Creating library file: .libs/libgucharmap.dll.a
collect2: ld returned 1 exit status
make[3]: *** [libgucharmap.la] Error 1
  
I tried to reorder the command, I tried to add some switches like
--export-all-symbols and -no-whole-archive, but it doesn't help.

A google search shows only one hit of interest:

http://article.gmane.org/gmane.comp.gnu.mingw.user/7425
where Danny Smith wrote at 29 May 2003:
>> gcc.exe -shared -Wl,--out-implib,libfoo.a -o foo.dll foo.o
>> Error: 0-bit reloc in dll
>> 
>> Any idea what I should look for to work around this issue?
>> 
> Did you use -r (or --relocateable) to construct the object?
> What version of ld?
> 
> The -r bug should be fixed in latest relwase candidade of binutils.
> Danny


Any ideas?  Was the '-r bug' which Danny fixed in the MinGW binutils
release candidate not fixed in the Cygwin binutils release, or is it
already included in the latest Cygwin binutils release?

I'm also not sure what is meant with 'Did you use -r ...', should I
use it or is there the bug and I shouldn't use it?

What I did at last was to change '-g -O2' to '-O2' to reduce the size
of the objects, because it was suggested in some other postings I
found that it happens only with big object files and I added the -r
flag to compile the objects for the dynamic library which results in
the same 'Error: 0-bit reloc in dll'.

Is it neccessary to recompile all the 25 libraries (which I need to
link the application to) with the -r switch?


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019