This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: TC_FORCE_RELOCATION_SECTION macro
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: TC_FORCE_RELOCATION_SECTION macro
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Fri, 15 Sep 2000 10:17:26 +1100 (EST)
- cc: binutils at sourceware dot cygnus dot com
On Thu, 14 Sep 2000, Jeffrey A Law wrote:
> > gas/ChangeLog
> > * config/tc-hppa.h (TC_FORCE_RELOCATION_SECTION): Allow
> > subtraction of two syms without emitting a relocation.
> >
> > * config/tc-hppa.c (hppa_force_relocation): Force relocations for
> > global or weak symbols. Delete a FIXME handled a bit later.
> At the least, this needs to be ELF specific as SOM requires the ability to
> create relocations for sym1-sym2 expressions.
Ah, thanks. I'll modify the tc-hppa.h patch. It seems to me that the
tc-hppa.c part is still correct for SOM. ie.
--- tc-hppa.c 2000/09/07 01:34:02 1.65
+++ tc-hppa.c 2000/09/14 13:22:11
@@ -8416,9 +8416,15 @@ hppa_force_relocation (fixp)
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;
+
shouldn't be #ifdef OBJ_ELF.
--
Linuxcare. Support for the Revolution.