This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[Patch]: Re: gas 2.10.91 from 20000920 cvs is broken under hpux 10.20
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Subject: [Patch]: Re: gas 2.10.91 from 20000920 cvs is broken under hpux 10.20
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Sun, 24 Sep 2000 18:25:05 -0400 (EDT)
- Cc: alan at linuxcare dot com dot au, binutils at sourceware dot cygnus dot com, dhd at linuxcare dot com
> > On Sat, 23 Sep 2000, John David Anglin wrote:
> >
> > > Look's like it fixes the problem, although I can't do a complete test now.
> >
> > Thanks. I'll commit the change, which goes back to the old SOM handling
> > for external and weak syms, on the strength of your say-so. Incidentally,
> > dhd's original patch was surrounded with #ifdef OBJ_ELF, but I changed
> > it...
Here is what I think is the correct fix. The above change is reverted
so that the test for external and weak is done for both ELF and SOM. This
fixes the test failure on reduce3.s. It is possible that the weak
checks are unnecessary, particularly for hppa_fix_adjustable. It appears
that adjust_reloc_syms does it own check for weak syms.
The fix for the problem is to change arg_reloc_stub_needed so that stubs
are generated for recursive calls.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2000-09-24 J. David Anglin <dave@hiauly1.hia.nrc.ca>
config/tc-hppa.c (arg_reloc_stub_needed): Stub is needed even when
caller and callee are the same.
(hppa_fix_adjustable): Do the external and weak checks for both ELF
and SOM.
(hppa_force_relocation): Likewise.
--- config/tc-hppa.c.orig Sun Sep 24 13:01:23 2000
+++ config/tc-hppa.c Sun Sep 24 17:52:40 2000
@@ -4323,8 +4323,7 @@
}
#if defined (OBJ_SOM) || defined (ELF_ARG_RELOC)
-#define arg_reloc_stub_needed(CALLER, CALLEE) \
- ((CALLEE) && (CALLER) && ((CALLEE) != (CALLER)))
+#define arg_reloc_stub_needed(CALLER, CALLEE) ((CALLEE) && (CALLER))
#else
#define arg_reloc_stub_needed(CALLER, CALLEE) 0
#endif
@@ -8310,11 +8309,11 @@
if (fixp->fx_r_type == (int) R_PARISC_GNU_VTINHERIT
|| fixp->fx_r_type == (int) R_PARISC_GNU_VTENTRY)
return 0;
+#endif
if (fixp->fx_addsy && (S_IS_EXTERNAL (fixp->fx_addsy)
|| S_IS_WEAK (fixp->fx_addsy)))
return 0;
-#endif
/* Reject reductions of symbols in sym1-sym2 expressions when
the fixup will occur in a CODE subspace.
@@ -8414,13 +8413,13 @@
if (fixp->fx_r_type == (int) R_PARISC_GNU_VTINHERIT
|| fixp->fx_r_type == (int) R_PARISC_GNU_VTENTRY)
return 1;
+#endif
/* Ensure we emit a relocation for global symbols so that dynamic
linking works. */
if (fixp->fx_addsy && (S_IS_EXTERNAL (fixp->fx_addsy)
|| S_IS_WEAK (fixp->fx_addsy)))
return 1;
-#endif
/* It is necessary to force PC-relative calls/jumps to have a relocation
entry if they're going to need either a argument relocation or long