public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [vms/committed]: Write linkage index from relocs
@ 2011-06-28  8:39 Tristan Gingold
  0 siblings, 0 replies; only message in thread
From: Tristan Gingold @ 2011-06-28  8:39 UTC (permalink / raw)
  To: binutils Development

Hi,

while writing the conditional reloc entries, linkage index was simply incremented instead of being
written from the reloc entries.  This was wrong, but may have worked by chance.

Now fixed.

Tristan.

bfd/
2011-06-28  Tristan Gingold  <gingold@adacore.com>

	* vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
	unsigned int.
	(_bfd_vms_write_etir): Write linkage index from reloc.


RCS file: /cvs/src/src/bfd/vms-alpha.c,v
retrieving revision 1.49
diff -c -r1.49 vms-alpha.c
*** vms-alpha.c	27 Jun 2011 13:03:15 -0000	1.49
--- vms-alpha.c	28 Jun 2011 08:39:12 -0000
***************
*** 330,336 ****
    struct vms_internal_eisd_map *gbl_eisd_tail;
  
    /* linkage index counter used by conditional store commands */
!   int vms_linkage_index;
  
    /* see tc-alpha.c of gas for a description.  */
    int flag_hash_long_names;	/* -+, hash instead of truncate */
--- 330,336 ----
    struct vms_internal_eisd_map *gbl_eisd_tail;
  
    /* linkage index counter used by conditional store commands */
!   unsigned int vms_linkage_index;
  
    /* see tc-alpha.c of gas for a description.  */
    int flag_hash_long_names;	/* -+, hash instead of truncate */
***************
*** 3947,3954 ****
  		  etir_output_check (abfd, section, curr_addr, 64);
  		  _bfd_vms_output_begin_subrec (recwr, ETIR__C_STC_LP_PSB);
  		  _bfd_vms_output_long
! 		    (recwr, (unsigned long) PRIV (vms_linkage_index));
! 		  PRIV (vms_linkage_index) += 2;
  		  hash = _bfd_vms_length_hash_symbol
                      (abfd, sym->name, EOBJ__C_SYMSIZ);
  		  _bfd_vms_output_counted (recwr, hash);
--- 3947,3955 ----
  		  etir_output_check (abfd, section, curr_addr, 64);
  		  _bfd_vms_output_begin_subrec (recwr, ETIR__C_STC_LP_PSB);
  		  _bfd_vms_output_long
! 		    (recwr, (unsigned long) rptr->addend);
!                   if (rptr->addend > PRIV (vms_linkage_index))
!                     PRIV (vms_linkage_index) = rptr->addend;
  		  hash = _bfd_vms_length_hash_symbol
                      (abfd, sym->name, EOBJ__C_SYMSIZ);
  		  _bfd_vms_output_counted (recwr, hash);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-28  8:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-28  8:39 [vms/committed]: Write linkage index from relocs Tristan Gingold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).