This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Patch: Problem with "make check" in ld on ia64.
- To: Jakub Jelinek <jakub at redhat dot com>
- Subject: Patch: Problem with "make check" in ld on ia64.
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Mon, 12 Feb 2001 16:56:26 -0800
- Cc: binutils at sourceware dot cygnus dot com
- References: <20010212141614.A2073@valinux.com> <20010212153610.A3637@valinux.com> <20010212163357.A4835@valinux.com>
On Mon, Feb 12, 2001 at 04:33:57PM -0800, H . J . Lu wrote:
> On Mon, Feb 12, 2001 at 03:36:10PM -0800, H . J . Lu wrote:
> > >
> > > The problem with "make check" in ld from CVS on ia64 came back now:
> > >
> > > Running
> > > /home/redhat/vacdrom/binutils/BUILD/binutils-2.10.1.0.7/ld/testsuite/ld-bootstrap/bootstrap.exp ...
> > > FAIL: bootstrap with --static
> > >
> >
>
> Ok. This time is for real :-). In get_dyn_sym_info () in elfxx-ia64.c,
> there are
>
> /* Construct a string for use in the elf64_ia64_local_hash_table.
> The name describes what was once anonymous memory. */
>
> len = sizeof (void*)*2 + 1 + sizeof (bfd_vma)*4 + 1 + 1;
> len += 10; /* %p slop */
>
> addr_name = alloca (len);
> sprintf (addr_name, "%p:%lx", (void *) abfd, ELF64_R_SYM (rel->r_info));
>
> /* Collect the canonical entry data for this address. */
> loc_h = elf64_ia64_local_hash_lookup (&ia64_info->loc_hash_table,
> addr_name, create, create);
> BFD_ASSERT (loc_h);
>
> pp = &loc_h->info;
>
> If 2 linkers have different addresses for abfd here, they will have
> different fake local symbols. It just happened that in the static
> bootstrap testcase, tmpdir/ld1 and tmpdir/ld2 are different. As the
> result, they will have diffferent addresses for abfd in get_dyn_sym_info
> such that we cannot compare the binaries generated by tmpdir/ld1 and
> tmpdir/ld2 for ia64. I think we have 2 options:
>
> 1. Mark "bootstrap with --static" as expected to fail on ia64.
> 2. Use tmpdir/ld3 to generate tmpdir/ld4. And then compare them.
>
> I prefer #2. Any comments?
>
>
Here is a patch for #2.
--
H.J. Lu (hjl@valinux.com)
--
2001-02-12 H.J. Lu <hjl@gnu.org>
* ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with
tmpdir/ld3 for -static on ia64.
Index: ld-bootstrap/bootstrap.exp
===================================================================
RCS file: /work/cvs/gnu/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 bootstrap.exp
--- ld-bootstrap/bootstrap.exp 2000/08/04 17:37:12 1.1.1.2
+++ ld-bootstrap/bootstrap.exp 2001/02/13 00:51:47
@@ -102,6 +102,19 @@ foreach flags {"" "strip" "--static" "--
continue
}
+ if {"$flags" == "--static"} {
+ if { [istarget ia64-*-elf*]
+ || [istarget ia64-*-linux*] } {
+ # On ia64, tmpdir/ld2 != tmpdir/ld3 is normal since they are
+ # generated by different linkers, tmpdir/ld1 and tmpdir/ld2.
+ # So we rebuild tmpdir/ld2 with tmpdir/ld3.
+ if ![ld_link tmpdir/ld3 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] {
+ fail $testname
+ continue
+ }
+ }
+ }
+
send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
verbose "cmp tmpdir/ld2 tmpdir/ld3"
catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output