This is the mail archive of the 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: fix some regressions for MMIX due to early fail for -r --relax

The May change reverted below was mistaken; the function
elf64-mmix.c:mmix_elf_relax_section handles relaxed relocatable links
quite nicely.  It really does handle it, not just by returning early.
Actually, --relax is forced on always for this target.  That -r works
(with the implicit --relax) is covered in the ld-mmix test-suite,
which should have been readily observable as regressions for that
patch.  Alas I have been lax myself in running the binutils
test-suites for MMIX.  Perhaps there was also confusion over the
failure of some test-cases involving -r:
Running /home/hp/binutils/src/ld/testsuite/ld-gc/gc.exp ...
FAIL: --gc-sections -r without -e
Running /home/hp/binutils/src/ld/testsuite/ld-libs/libs.exp ...
FAIL: -l: test
An additional "-m elf64-mmix" is required for "-r" to work properly;
else the output is in the mmo object format, which is not relocatable
(causing "-l: test" to fail).  Emitting non-relocatable output for -r
by default of course does not make sense, so I'll change it to emit
"elf64-mmix" rather than "mmo" when -r is active.  Also, an ENTRY is
mistakenly emitted in the default -r link-script, which causes mismatch
in the expected error message for "--gc-sections -r without -e".

This patch fixes the following regressions (others remaining):

Running /home/hp/binutils/src/ld/testsuite/ld-libs/libs.exp ...
FAIL: -l: test (preparation)
Running /home/hp/binutils/src/ld/testsuite/ld-mmix/mmix.exp ...
FAIL: ld-mmix/pushjs1r
FAIL: ld-mmix/pushjs2r
FAIL: ld-mmix/pushjs3r
FAIL: ld-mmix/pushjs4r


	* elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
	change.  Add note to head comment.

Index: bfd/elf64-mmix.c
RCS file: /cvs/src/src/bfd/elf64-mmix.c,v
retrieving revision 1.59
diff -p -u -r1.59 elf64-mmix.c
--- bfd/elf64-mmix.c	27 May 2009 13:31:23 -0000	1.59
+++ bfd/elf64-mmix.c	28 Jul 2009 22:58:08 -0000
@@ -2557,7 +2557,7 @@ mmix_dump_bpo_gregs (link_info, pf)
    when the last such reloc is done, an index-array is sorted according to
    the values and iterated over to produce register numbers (indexed by 0
    from the first allocated register number) and offsets for use in real
-   relocation.
+   relocation.  (N.B.: Relocatable runs are handled, not just punted.)

    PUSHJ stub accounting is also done here.

@@ -2590,10 +2590,6 @@ mmix_elf_relax_section (abfd, sec, link_
   /* Assume nothing changes.  */
   *again = FALSE;

-  if (link_info->relocatable)
-    (*link_info->callbacks->einfo)
-      (_("%P%F: --relax and -r may not be used together\n"));
   /* We don't have to do anything if this section does not have relocs, or
      if this is not a code section.  */
   if ((sec->flags & SEC_RELOC) == 0

brgds, H-P

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