diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-03-27 17:31:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-03-27 17:31:06 +0000 |
commit | 23ac3ca1f02469e8f7d4a795d95978585c40be19 (patch) | |
tree | cd617974d6c5261688e82a82d4cb6c2747fcf304 /gas/config | |
parent | 0e9c437767591f90f0731728ae6b0c8560ed4f87 (diff) | |
download | gdb-23ac3ca1f02469e8f7d4a795d95978585c40be19.zip gdb-23ac3ca1f02469e8f7d4a795d95978585c40be19.tar.gz gdb-23ac3ca1f02469e8f7d4a795d95978585c40be19.tar.bz2 |
* 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.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-elf.c | 17 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 15 |
2 files changed, 22 insertions, 10 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 6f13bb6..40c6d02 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -41,6 +41,14 @@ #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)); @@ -264,7 +272,7 @@ obj_elf_common (ignore) *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 (); @@ -330,8 +338,8 @@ obj_elf_common (ignore) 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); @@ -344,8 +352,7 @@ obj_elf_common (ignore) 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 diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 5a92c24..f6cdebe 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -1197,14 +1197,19 @@ insn_uses_reg (ip, reg, class) 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; @@ -9659,7 +9664,7 @@ nopic_need_relax (sym) || 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 |