Question about gnu archiver and de-archivers (ELF OMF)

maxim maxim.grigoriev@windriver.com
Wed Mar 13 15:27:00 GMT 2002


Hi GNU binutils experts and anybody who is interested,

I'm working on GNU toolchains at Wind River Systems.
Recently, one problem came up. GNU utilities "objdump",
"nm", and "ar" appeared to be not System V ABI compliant
when configured to produce ELF OMF.

We discovered it when tried to apply "nm" and "objdump"
utilities to the archives generated by non-gnu compiler
tools.

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 ).

I'm going to change this misbehavior in our source bases
(and try to submit a patch to the FSF) fixing the

.../bfd/elfxx-target.h file replacing "14" by "15" in two places:


#### diff -c elfxx-target.h elfxx-target.h@@/main/tor2_x.veloce5/0

*** elfxx-target.h      Wed Mar 13 14:40:48 2002
--- elfxx-target.h@@/main/tor2_x.veloce5/0      Wed Mar 13 12:38:07 2002
***************
*** 463,478 ****
       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) */
!   15,

--- 463,469 ----
       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,

***************
*** 567,582 ****
       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) */
!   15,

--- 558,564 ----
       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,


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.

I'd appreciate any help in this matter.

Thanks in advance,
Maxim



More information about the Binutils mailing list