[vms/committed]: generate and write the GST
Wed May 26 13:07:00 GMT 2010
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);
> ! /* 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
$ mac x
$ link x/share,tt:/opt
More information about the Binutils