[vms/committed]: Handle LIB$INITIALIZE
h.becker
becker.ismaning@freenet.de
Tue Jun 1 11:55:00 GMT 2010
Tristan Gingold wrote:
> + /* Only put in the GSD the global and the undefined symbols. */
> if (old_flags & BSF_FILE)
> continue;
>
> ! if ((old_flags & BSF_GLOBAL) == 0 && !bfd_is_und_section (symbol->section))
> ! {
> ! /* If the LIB$INITIIALIZE section is present, add a reference to
> ! LIB$INITIALIZE symbol. FIXME: this should be done explicitely
> ! in the assembly file. */
> ! if (!((old_flags & BSF_SECTION_SYM) != 0
> ! && strcmp (symbol->section->name, "LIB$INITIALIZE") == 0))
> ! continue;
> ! }
Regarding image initialization, the presence of a LIB$INITIIALIZE PSECT
doesn't do anything, especially it does not result in adding a reference
to the LIB$INITIALIZE symbol. Image initialization with LIB$INITIALIZE
doesn't work that way.
> + /* Set transfer addresses. */
> + {
> + int i;
> + struct bfd_link_hash_entry *h;
> +
> + i = 0;
> + PRIV (transfer_address[i++]) = 0xffffffff00000340; /* SYS$IMGACT */
> + h = bfd_link_hash_lookup (info->hash, "LIB$INITIALIZE", FALSE, FALSE, TRUE);
> + if (h != NULL && h->type == bfd_link_hash_defined)
> + PRIV (transfer_address[i++]) =
> + alpha_vms_get_sym_value (h->u.def.section, h->u.def.value);
> + PRIV (transfer_address[i++]) = bfd_get_start_address (abfd);
> + while (i < 4)
> + PRIV (transfer_address[i++]) = 0;
> + }
> +
I would add a FIXME or ADDME, here. But it depends whether you want to
support linking /NOTRACEBACK or not.
> + /* FIXME: we should place sections by VMS program section flags. */
> +
Hmm, do you mean according to the tables in the VMS linker manual? Then
you also want to place by target type: for shareable images SHR becomes
important.
Hartmut
More information about the Binutils
mailing list