This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: equating symbols to undefined
>Does this one work for you?
Yes, it (obviously) does, since - as far as I can tell - it just
restores the previous code.
Thanks, Jan
>H.J.
>---
>2005-10-24 H.J. Lu <hongjiu.lu@intel.com>
>
> * write.c (adjust_reloc_syms): Undo the change made on
> 2005-04-26 to allow local symbol set to undefined symbol.
>
>--- gas/write.c.undef 2005-08-30 17:32:55.000000000 -0700
>+++ gas/write.c 2005-10-24 10:33:13.000000000 -0700
>@@ -680,16 +680,8 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_U
> convert the fixup to being against that symbol. */
> if (symbol_equated_reloc_p (sym))
> {
>- symbolS *new_sym
>- = symbol_get_value_expression (sym)->X_add_symbol;
>- const char *name = S_GET_NAME (sym);
>- if (!S_IS_COMMON (new_sym)
>- && !TC_FAKE_LABEL (name)
>- && (!S_IS_EXTERNAL (sym) || S_IS_LOCAL (sym)))
>- as_bad (_("Local symbol `%s' can't be equated to undefined
symbol `%s'"),
>- name, S_GET_NAME (new_sym));
> fixp->fx_offset += symbol_get_value_expression
(sym)->X_add_number;
>- sym = new_sym;
>+ sym = symbol_get_value_expression (sym)->X_add_symbol;
> fixp->fx_addsy = sym;
> }
>