link problems under darwin5.2

Andreas Tobler toa@pop.agri.ch
Mon Jan 7 06:33:00 GMT 2002



Andreas Tobler wrote:
> 
> Tom Tromey wrote:
> 
> > There should be 3 files named `Attributes.o' -- they are
> > from java/util/jar/, org/xml/sax/, and javax/naming/directory/.
> > So now you need to find out why one is missing.
> 
> Huh, I checked first the libgcj.objectlist, here all files are in. Then
> I had a look at the stdout while linking. As well, I see all
> Attributes.o and the Reference.o
> I see also that we do piecewise linking.
> So either my ar is buggy or something strange happens:
> 
> If I take for example the Reference.o I see with ar -tv .libs/libgcj.a
> |grep Reference.o the following:
> 
> rw-r--r--     501/20        22848 Jan  7 09:16 2002 Reference.o
> 
> This is:
> -rw-r--r--  1 andreast  staff  22848 Jan  7 09:16 javax/naming/Reference.o
> 
> In the ar order this one is the SECOND Reference.o, the first
> Reference.o is in size different:
> 
> -rw-r--r--  1 andreast  staff  11540 Jan  7 07:41 java/lang/ref/Reference.o
> 
> So my guess is, Reference.o (java/lang/ref/) is overwritten by
> Reference.o(javax/naming/). I cross checked on the U10(solaris2.6) and
> here it works.
> The man page from ar is dated 1993.
> Right now I retry with Attributes since here we have two of three
> occurences. Piecewise linking??

Here the Attributes.o case:

ar -tv libgcj.a |grep Attributes.o
rw-r--r--     501/20         6536 Jan  7 14:15 2002 Attributes.o
rw-r--r--     501/20         6436 Jan  7 13:25 2002 Attributes.o
rw-r--r--     501/20        30060 Jan  7 14:17 2002 BasicAttributes.o

Where:
-rw-r--r--  1 andreast  staff  38760 Jan  7 13:16 java/util/jar/Attributes.o
-rw-r--r--  1 andreast  staff  6436 Jan  7 13:25 org/xml/sax/Attributes.o
-rw-r--r--  1 andreast  staff  6536 Jan  7 14:15 javax/naming/directory/Attributes.o

When having a look at the linkorder then I see 
1. java/util/jar/Attributes.o
2. org/xml/sax/Attributes.o
3. javax/naming/directory/Attributes.o

1 & 2 are in the first piece, 3 is in the second piece.

Do I probably have a defective ar?

Thanks,
Andreas



More information about the Java mailing list