+Thu Feb 3 23:07:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/obj-ecoff.h (TARGET_SYMBOL_FIELDS): Changed
+ ecoff_undefined to ecoff_extern_size.
+ * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Likewise.
+ * config/tc-mips.c (s_extern): Set ecoff_extern_size to the
+ external symbol size, rathern than setting the symbol value.
+ (md_estimate_size_before_relax): Check both ecoff_extern_size and
+ symbol value to see if GP referencing can be used.
+ * ecoff.c (ecoff_symbol_new_hook): Clear ecoff_extern_size, not
+ ecoff_undefined.
+ (ecoff_frob_symbol): Don't check ecoff_undefined.
+ (ecoff_build_symbols): Get size of an undefined symbol from
+ sym->ecoff_extern_size, not S_GET_VALUE (sym).
+
Wed Feb 2 13:55:08 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
* Makefile.in: Avoid bug in losing hpux sed.
add_file ((const char *) NULL, 0);
symbolP->ecoff_file = cur_file_ptr;
symbolP->ecoff_symbol = NULL;
- symbolP->ecoff_undefined = 0;
+ symbolP->ecoff_extern_size = 0;
}
\f
/* Add a page to a varray object. */
cur_file_ptr = save_file_ptr;
}
\f
-/* Frob an ECOFF symbol. A .extern symbol will have a value, but is
- not common. Small common symbols go into a special .scommon
- section rather than bfd_com_section. */
+/* Frob an ECOFF symbol. Small common symbols go into a special
+ .scommon section rather than bfd_com_section. */
void
ecoff_frob_symbol (sym)
symbolS *sym;
{
- if (sym->ecoff_undefined)
- S_SET_SEGMENT (sym, undefined_section);
- else if (S_IS_COMMON (sym)
+ if (S_IS_COMMON (sym)
&& S_GET_VALUE (sym) > 0
&& S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput))
{
else
st = st_Static;
- if (! S_IS_DEFINED (as_sym)
- || as_sym->ecoff_undefined)
+ if (! S_IS_DEFINED (as_sym))
{
- if (S_GET_VALUE (as_sym) > 0
- && (S_GET_VALUE (as_sym)
- <= bfd_get_gp_size (stdoutput)))
- sc = sc_SUndefined;
- else
+ if (as_sym->ecoff_extern_size == 0
+ || (as_sym->ecoff_extern_size
+ > bfd_get_gp_size (stdoutput)))
sc = sc_Undefined;
+ else
+ {
+ sc = sc_SUndefined;
+ sym_ptr->ecoff_sym.asym.value =
+ as_sym->ecoff_extern_size;
+ }
}
else if (S_IS_COMMON (as_sym))
{