This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: arm-wince-pe-ld problem w/libgcj


Hello Nick & binutils:

Wow, I really hate to answer my own questions!  It's so embarrassing.. 
Still, the source of this apparent ld problem is not too obvious and I
want to ensure that others don't spend too much time on it.

The root of the problem is data declarations of the form:

__declspec(dllexport)

in the GCJ and Boehm sources.  These declarations are generating the
relocations that arm-wince-pe-ld cannot deal with.

Happily, we want nothing to do with dll's in this project.  The goal is
simply to be able to create statically linked executables w/GCJ.  Thus
we have been able to end-run this problem by disabling such declarations
in the libjava and boehm-gc sources.  This should be a perfectly general
and adequate solution for the foreseeable future.

Thanks Nick, and to everyone for all of the help..

regards,
craig vanderborgh
voxware incorporated

On Thu, 2003-05-29 at 14:30, Craig A. Vanderborgh wrote:
> On Thu, 2003-05-29 at 11:32, Nick Clifton wrote:
> > Hi Craig,
> > 
> > > The trouble is when I try to link HelloWorld.o against libgcj. I
> > > repeatedly see:
> > >
> > > Error: 24-bit reloc in dll
> > 
> > It appears that the code in ld/pe-dll.c:generate_reloc() is not able
> > to handle some of the relocs it is encountering in the input files.
> > 
> > 
> > > when libgcj.a is processed by ld.  This is pretty weird because I see
> > > this for, e.g.
> > >
> > > arm-wince-pe-gcc -v -o HelloWorld HelloWorld.o -lgcj
> > >
> > > where there aren't even any dll's in the linker input.
> > 
> > What about the C library ?  Is this set up as dll ?
> > 
> > > Any ideas would be appreciated.
> > 
> > Do you have a small, reproducible example that demonstrates the
> > problem ?  Ideally a small object file or two and simple linker
> > command line would be best.
> > 
> 
> I do now :^)  Here is a tarball-let with a short script that will
> demonstrate the problem on arm-wince-pe.  In this example the object
> that ld dislikes is misc.o, which if from the Boehm garbage collector
> (directory boehm-gc of the gcc-3.3 hierarchy) The output from the link
> command is thus:
> zetar% arm-wince-pe-ld -v -M crt0.o HelloWorld.o misc.o |&more
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> Error: 24-bit reloc in dll
> HelloWorld.o(.text+0x18): In function
> `ZN10HelloWorld4mainEP6JArrayIPN4java4lang6StringEE':
> /home/craigv/gcj/HelloWorld.java:2: undefined reference to
> `_Jv_InitClass'
> .
> .
> .
> (lots of unresolved references..)
> 
> Nick, thanks a lot for thinking about this and replying.  Please let me
> know if I can provide further info/assistance.
> 
> craig
> 
> 
> > Cheers
> >         Nick
> 



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