This is the mail archive of the
mailing list for the binutils project.
Re: [VMS/committed]: Set extension to archive member
- From: "h.becker" <becker dot ismaning at freenet dot de>
- To: binutils at sourceware dot org
- Date: Tue, 17 Apr 2012 14:32:59 +0200
- Subject: Re: [VMS/committed]: Set extension to archive member
- References: <2FDC53D8-39B6-41C9-9DEC-4C263D03CCE7@adacore.com>
On 04/17/12 12:50, Tristan Gingold wrote:
VMS archives member names doesn't have extension (only the 'basename' is stored).
But this is not the usual convention for ar, and some tools (libtool) expect that extracted
members of an archive to have the standard object extension.
This patch implements this behaviour, thus making VMS archives more UNIX friendly.
It's not obvious to me whether the change adds the object extension to
the member name or if it is added just for extracting a member. Adding
it to the member name will make the library somehow "unusal" for VMS. It
may break tools like MMS and it sure will confuse VMS users. It may not
break the VMS linker, but I didn't check.
For what it is worth, VMS object libraries contain object modules. The
name of the module is determined on VAX and Alpha: by the [e]mh$t_name
in the object module header record; on I64: by the NT_VMS_MHD entry in
the notes section. The object language, as documented in the Linker
manual, only restricts the length of the module name: 31 characters. It
is up to the tool which generates the object module - in VMS terms the
language processor - to write this module header. Usually the language
processors allow the users to specify the module name, for example C
with "#pragma module". (The HP C compiler expects a C identifier for
this #pragma, which is a HP C compiler limitation). All language
processors have default values, for the case that a user doesn't specify
a name. Some but not all language processors use the basename. VAX macro
for example uses ".MAIN.", which is not a valid ODS2 basename. The C
compiler uses the basename. For ODS5 disks this can result in funny
module names for C sources like "a.b.c".