This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [vms/committed]: Handle LIB$INITIALIZE
- From: "h.becker" <becker dot ismaning at freenet dot de>
- To: binutils <binutils at sourceware dot org>
- Date: Tue, 01 Jun 2010 13:54:58 +0200
- Subject: Re: [vms/committed]: Handle LIB$INITIALIZE
- References: <01AE0A36-AEDC-4C4F-9E8E-DB615C173B8B@adacore.com>
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