This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [vms/committed]: generate and write the GST
- From: "h.becker" <becker dot ismaning at freenet dot de>
- To: binutils <binutils at sourceware dot org>
- Date: Wed, 26 May 2010 15:07:25 +0200
- Subject: Re: [vms/committed]: generate and write the GST
- References: <7E46778F-A11E-4481-93EC-5479A76302AE@adacore.com>
Tristan Gingold wrote:
the GST is the global symbol table, ie the symbol table in a executable. With this patch, the linker
is now able to write it, which is required to debug an executable.
The GST is not "required" to debug an executable.
Unfortunately the VMS terms are not always consistent. The GST is the
global symbol table. It is written to an image (or an STB file). It is
always written into shareable images which have a symbol vector and
which are intended to be used in further link operations. This GST
within the image only contains universal symbols: the symbols listed in
a symbol vector.
Main images usually do not have a GST. They only have one, when linked
with /DEBUG. Then the VMS linker not only collects debug information
from objects and writes them into the image, the linker also writes a
GST. Because there are no universal symbols, here the GST contains all
the global symbols. (Sorry, the VMS ANALYZE/IMAGE utility will not show
the GST of a main image). This GST is for debug purpose, but it is
additional information and it contains only global symbols. The debug
information usually contains local symbols as well. To make it more
confusing, if you link a shareable image with /DEBUG the GST still
consists only of the universal symbols.
--- 1632,1639 ----
return RELC_SHR_BASE + PRIV2 (h->sym->owner, shr_index);
else
{
! /* Can this happen (non-relocatable symg) ? I'd like to see
! an example. */
abort ();
}
}
An EGSD$C_SYMG with EGSY$V_REL==0? Easily:
$ cre x.mar
whatever==4711
.end
$ mac x
$ link x/share,tt:/opt
symbol_v=(whatever=data)
^Z
$
Hartmut