+Thu Mar 27 12:23:56 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * read.c (s_comm): Check S_IS_COMMON as well as S_IS_DEFINED.
+ (s_mri_common): Check S_IS_COMMON unconditionally.
+ * symbols.c (colon): Check S_IS_COMMON as well as S_IS_DEFINED.
+ * config/tc-alpha.c (s_alpha_comm): Likewise.
+ * config/tc-mips.c (nopic_need_relax): Likewise.
+ * config/tc-ppc.c (ppc_elf_lcomm): Likewise.
+ (ppc_pe_comm): Likewise.
+ * config/obj-elf.c (obj_elf_common): Likewise. Set segment of
+ common symbol to bfd_com_section_ptr.
+ * config/tc-sparc.c (s_common): Likewise.
+ (tc_gen_reloc): Likewise.
+
start-sanitize-d30v
Thu Mar 27 00:29:46 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
#include "elf/ppc.h"
#endif
+static bfd_vma elf_s_get_size PARAMS ((symbolS *));
+static void elf_s_set_size PARAMS ((symbolS *, bfd_vma));
+static bfd_vma elf_s_get_align PARAMS ((symbolS *));
+static void elf_s_set_align PARAMS ((symbolS *, bfd_vma));
+static void elf_copy_symbol_attributes PARAMS ((symbolS *, symbolS *));
+static int elf_sec_sym_ok_for_reloc PARAMS ((asection *));
+static void adjust_stab_sections PARAMS ((bfd *, asection *, PTR));
+
#ifdef NEED_ECOFF_DEBUG
static boolean elf_get_extr PARAMS ((asymbol *, EXTR *));
static void elf_set_index PARAMS ((asymbol *, bfd_size_type));
*p = 0;
symbolP = symbol_find_or_make (name);
*p = c;
- if (S_IS_DEFINED (symbolP))
+ if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
as_bad ("Ignoring attempt to re-define symbol");
ignore_rest_of_line ();
if (S_GET_SEGMENT (symbolP) == bss_section)
symbolP->sy_frag->fr_symbol = 0;
symbolP->sy_frag = frag_now;
- pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, size,
- (char *) 0);
+ pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
+ (offsetT) size, (char *) 0);
*pfrag = 0;
S_SET_SIZE (symbolP, size);
S_SET_SEGMENT (symbolP, bss_section);
S_SET_VALUE (symbolP, (valueT) size);
S_SET_ALIGN (symbolP, temp);
S_SET_EXTERNAL (symbolP);
- /* should be common, but this is how gas does it for now */
- S_SET_SEGMENT (symbolP, bfd_und_section_ptr);
+ S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
}
}
else
else
{
if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_X)
- && ((ip->insn_opcode >> MIPS16OP_SH_RX) & MIPS16OP_MASK_RX) == reg)
+ && (mips16_to_32_reg_map[((ip->insn_opcode >> MIPS16OP_SH_RX)
+ & MIPS16OP_MASK_RX)]
+ == reg))
return 1;
if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_Y)
- && ((ip->insn_opcode >> MIPS16OP_SH_RY) & MIPS16OP_MASK_RY) == reg)
+ && (mips16_to_32_reg_map[((ip->insn_opcode >> MIPS16OP_SH_RY)
+ & MIPS16OP_MASK_RY)]
+ == reg))
return 1;
if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_Z)
- && ((ip->insn_opcode >> MIPS16OP_SH_MOVE32Z)
- & MIPS16OP_MASK_MOVE32Z) == reg)
+ && (mips16_to_32_reg_map[((ip->insn_opcode >> MIPS16OP_SH_MOVE32Z)
+ & MIPS16OP_MASK_MOVE32Z)]
+ == reg))
return 1;
if ((ip->insn_mo->pinfo & MIPS16_INSN_READ_T) && reg == TREG)
return 1;
|| strcmp (symname, "end") == 0
|| strcmp (symname, "_gp_disp") == 0))
change = 1;
- else if (! S_IS_DEFINED (sym)
+ else if ((! S_IS_DEFINED (sym) || S_IS_COMMON (sym))
&& (0
#ifndef NO_ECOFF_DEBUGGING
|| (sym->ecoff_extern_size != 0