Question about gnu archiver and de-archivers (ELF OMF)
Nick Clifton
nickc@cambridge.redhat.com
Thu Mar 14 02:58:00 GMT 2002
Hi Maxim,
> The problem is that GNU archivers and "de-archivers"
> handle the transition between short and long filenames
> differently. GNU considers them as long if they are more
> than 14 characters, but System V ABI prescribes to handle
> them as long if they are more than 15 characters. (See
> System V ABI, Ch.7 Formats and Protocols, Archive File).
> So my question is whether it's safe to do it. I'm slightly concern
> since I suspect some unknown reason might exist for why people put
> "14" instead of "15". And, this hidden reason should be serious
> enough because it breaks System V ABI rules.
Well the comment in the code indicates that the value of "14" was a
wild guess, so I assume that the author was unaware of the System V
ABI specification in this area. Hence I doubt if there really is a
serious reason do deny this patch and so I have applied this
variant. (I have not applied the patch to the 2.12 branch however,
just in case it turns out that there is a problem).
Cheers
Nick
2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
* elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
(TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
Index: bfd/elfxx-target.h
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-target.h,v
retrieving revision 1.36
diff -c -3 -p -w -r1.36 elfxx-target.h
*** elfxx-target.h 2001/12/18 17:59:59 1.36
--- elfxx-target.h 2002/03/14 10:51:59
*************** const bfd_target TARGET_BIG_SYM =
*** 523,531 ****
/* ar_max_namelen: maximum number of characters in an archive header
FIXME: this really has nothing to do with ELF, this is a characteristic
! of the archiver and should be independently tunable. This value is
! a WAG (wild a** guess) */
! 14,
/* Routines to byte-swap various sized integers from the data sections */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
--- 523,531 ----
/* ar_max_namelen: maximum number of characters in an archive header
FIXME: this really has nothing to do with ELF, this is a characteristic
! of the archiver and should be independently tunable. The System V ABI,
! Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
! 15,
/* Routines to byte-swap various sized integers from the data sections */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
*************** const bfd_target TARGET_LITTLE_SYM =
*** 619,627 ****
/* ar_max_namelen: maximum number of characters in an archive header
FIXME: this really has nothing to do with ELF, this is a characteristic
! of the archiver and should be independently tunable. This value is
! a WAG (wild a** guess) */
! 14,
/* Routines to byte-swap various sized integers from the data sections */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
--- 619,627 ----
/* ar_max_namelen: maximum number of characters in an archive header
FIXME: this really has nothing to do with ELF, this is a characteristic
! of the archiver and should be independently tunable. The System V ABI,
! Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
! 15,
/* Routines to byte-swap various sized integers from the data sections */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
More information about the Binutils
mailing list