This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed, MMIX: Fix for NOCROSSREFS 2.


I ran the binutils tests that require a compiler in a unified
tree and found a few failures.  This should fix "NOCROSSREFS 2";
at least stop the SEGV.  Not really worth it for the 2.12 branch
(unless someone insists); it's more of a "don't do that then"
error than something someone is likely to trip upon.

	* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
	for presence of .MMIX.reg_contents.linker_allocated before early
	exit.

Index: mmix-elfnmmo.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/mmix-elfnmmo.em,v
retrieving revision 1.4
retrieving revision 1.6
diff -p -c -r1.4 -r1.6
*** mmix-elfnmmo.em	2002/02/09 05:07:07	1.4
--- mmix-elfnmmo.em	2002/02/15 06:54:22	1.6
*************** mmix_after_allocation ()
*** 61,67 ****
      = bfd_get_section_by_name (output_bfd, MMIX_REG_CONTENTS_SECTION_NAME);
    bfd_signed_vma regvma;

!   /* If there's no register section, we don't need to do anything.  */
    if (sec == NULL)
      return;

--- 61,81 ----
      = bfd_get_section_by_name (output_bfd, MMIX_REG_CONTENTS_SECTION_NAME);
    bfd_signed_vma regvma;

!   /* If there's no register section, we don't need to do anything.  On the
!      other hand, if there's a non-standard linker-script without a mapping
!      from MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME when that section is
!      present (as in the ld test "NOCROSSREFS 2"), that section (1) will be
!      orphaned; not inserted in MMIX_REG_CONTENTS_SECTION_NAME and (2) we
!      will not do the necessary preparations for those relocations that
!      caused it to be created.  We'll SEGV from the latter error.  The
!      former error in separation will result in a non-working binary, but
!      that's expected when you play tricks with linker scripts.  The
!      "NOCROSSREFS 2" test does not run the output so it does not matter
!      there.  */
!   if (sec == NULL)
!     sec
!       = bfd_get_section_by_name (output_bfd,
! 				 MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME);
    if (sec == NULL)
      return;


brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]