Subject: RE: [avail for test] libtool-devel-20030121-1
From: "Ralf Habacker" <[email-masked]>
To: "Charles Wilson" <[email-masked]>
Cc: <[email-masked]>
Date: Wed, 12 Feb 2003 09:22:01 +0100

> But, you'd still need to check all "static libs" to see if they are
> really import libs after all.  The good news it that we expect this to
> happen only rarely: when an import lib is a "hybrid" lib with static
> objs "in front" --> the modified 'file' test incorrectly identifies it
> as a static archive.

This depends on how the hybrid lib is created. If it starts with the static
object files, it would be identified as static, if it starts with the import
library as import library.

BTW: Do you know which libraries are also hybrid execpt of cygwin1.dll ?

> Question: for "normal" import libs (that is, excluding the hybrids like
> libcygwin.a), does your version work always? Or does _dll_iname 'float
> around' even within otherwise normal import libs?
>
'file' supports indirect offset generation. See $ man magic

       Indirect  offsets  are  of  the  form:
       ((x[.[bslBSL]][+-][y]).  The value of x is used as  an  offset  in  the
       file.  A  byte,  short  or long is read at that offset depending on the
       [bslBSL] type specifier. The capitalized types interpret the number  as
       a big endian value, whereas the small letter versions interpet the num-
       ber as a little endian value. To that number the value of  y  is  added
       and  the  result  is used as an offset in the file. The default type if
       one is not specified is long.

       Sometimes you do not know the exact  offset  as  this  depends  on  the
       length  of  preceding fields. You can specify an offset relative to the
       end of the last uplevel field (of course this may only be done for sub-
       level  tests,  i.e.  test beginning with > ). Such a relative offset is
       specified using & as a prefix to the offset.

That mean, we onbly have to figure out the relative pointer to the 'dll_iname'
string.
When I have time, I will look into the coff file format or is someone else here,
who can give a pointer to this ?

Ralf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/