This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: The ia64 linker problems.
On Tue, Feb 06, 2001 at 12:49:51AM -0800, Richard Henderson wrote:
> On Mon, Feb 05, 2001 at 09:45:35PM -0800, H . J . Lu wrote:
> > * config/tc-ia64.c (ia64_force_relocation): Return 1 for global
> > symbols.
>
> See TC_RELOC_RTSYM_LOC_FIXUP instead. I don't think I truely
> understand the difference between the two, but that is how
> other targets prevent the resolution in question.
>
>
Here it is. It does the trick. May I check it in? BTW, could you
please also approve/reject
http://sources.redhat.com/ml/binutils/2001-02/msg00029.html
Thanks.
--
H.J. Lu (hjl@valinux.com)
---
2001-02-06 H.J. Lu <hjl@gnu.org>
* config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): New. Defined.
Index: config/tc-ia64.h
===================================================================
RCS file: /work/cvs/gnu/binutils/gas/config/tc-ia64.h,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 tc-ia64.h
--- config/tc-ia64.h 2000/12/29 20:29:33 1.1.1.6
+++ config/tc-ia64.h 2001/02/06 17:11:24
@@ -246,3 +246,15 @@ typedef struct unwind_record
unw_x_record x;
} record;
} unwind_record;
+
+/* This expression evaluates to false if the relocation is for a local
+ object for which we still want to do the relocation at runtime.
+ True if we are willing to perform this relocation while building
+ the .o file. This is only used for pcrel relocations. */
+
+#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
+ ((FIX)->fx_addsy == NULL \
+ || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && S_IS_DEFINED ((FIX)->fx_addsy) \
+ && ! S_IS_COMMON ((FIX)->fx_addsy)))