diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-02-08 00:22:02 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-02-08 00:22:02 +0000 |
commit | 71dd3c40ca2f64cad99a6eba7b53fb6c2aedc641 (patch) | |
tree | 88b3b6d53d9ccc089596ae31bbd495883c8eb945 /gas/config | |
parent | 9addcbb1821ad664a6c180820fdd10d31c9fcbf2 (diff) | |
download | gdb-71dd3c40ca2f64cad99a6eba7b53fb6c2aedc641.zip gdb-71dd3c40ca2f64cad99a6eba7b53fb6c2aedc641.tar.gz gdb-71dd3c40ca2f64cad99a6eba7b53fb6c2aedc641.tar.bz2 |
* read.c (potable): Add balignw, balignl, p2alignw, and p2alignl.
(do_align): Take new len parameter. Change all callers. Pass it
to md_do_align.
(s_align_bytes): Arg now indicates the length of the fill pattern.
(s_align_ptwo): Likewise.
* config/obj-coff.c (write_object_file): Pass length to
md_do_align.
* config/tc-i386.h (md_do_align): Take new len parameter.
* config/tc-m88k.h (md_do_align): Likewise.
* config/tc-m88k.c (m88k_do_align): Likewise.
* config/tc-sh.h (md_do_align): Likewise.
* config/tc-sh.c (sh_do_align): Likewise.
* doc/as.texinfo: Document new pseudo-ops.
* config/obj-coff.c (fixup_mdeps): Divide offset by fr_var, as is
done in cvt_frag_to_fill.
PR 8974.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-coff.c | 17 | ||||
-rw-r--r-- | gas/config/tc-m88k.c | 8 | ||||
-rw-r--r-- | gas/config/tc-m88k.h | 8 | ||||
-rw-r--r-- | gas/config/tc-sh.c | 7 |
4 files changed, 26 insertions, 14 deletions
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index 04b8ad9..6c939d9 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -1672,8 +1672,9 @@ do_relocs_for (abfd, h, file_cursor) intr.r_offset = 0; #endif - while (S_GET_SEGMENT (symbol_ptr) == undefined_section - && symbol_ptr->sy_value.X_op == O_symbol) + while (symbol_ptr->sy_value.X_op == O_symbol + && (! S_IS_DEFINED (symbol_ptr) + || S_IS_COMMON (symbol_ptr))) symbol_ptr = symbol_ptr->sy_value.X_add_symbol; /* Turn the segment of the symbol into an offset. */ @@ -2700,6 +2701,13 @@ yank_symbols () symbol_remove (symbolP, &symbol_rootP, &symbol_lastP); } + else if (symbolP->sy_value.X_op == O_symbol + && (! S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP))) + { + /* Skip symbols which were equated to undefined or common + symbols. */ + symbol_remove (symbolP, &symbol_rootP, &symbol_lastP); + } else if (!S_IS_DEFINED (symbolP) && !S_IS_DEBUG (symbolP) && !SF_GET_STATICS (symbolP) && @@ -3039,7 +3047,7 @@ write_object_file () #ifdef md_do_align { static char nop = NOP_OPCODE; - md_do_align (SUB_SEGMENT_ALIGN (now_seg), &nop, alignment_done); + md_do_align (SUB_SEGMENT_ALIGN (now_seg), &nop, 1, alignment_done); } #endif frag_align (SUB_SEGMENT_ALIGN (now_seg), NOP_OPCODE); @@ -3656,7 +3664,8 @@ fixup_mdeps (frags, h, this_segment) #endif frags->fr_type = rs_fill; frags->fr_offset = - (frags->fr_next->fr_address - frags->fr_address - frags->fr_fix); + ((frags->fr_next->fr_address - frags->fr_address - frags->fr_fix) + / frags->fr_var); break; case rs_machine_dependent: md_convert_frag (h, this_segment, frags); diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c index 10c26e6..ca49ac2 100644 --- a/gas/config/tc-m88k.c +++ b/gas/config/tc-m88k.c @@ -1,7 +1,8 @@ /* m88k.c -- Assembler for the Motorola 88000 Contributed by Devon Bowen of Buffalo University and Torbjorn Granlund of the Swedish Institute of Computer Science. - Copyright (C) 1989, 1990, 1991, 1993 Free Software Foundation, Inc. + Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -1432,11 +1433,12 @@ md_pcrel_from (fixp) /* When we align the .init section, insert the correct NOP pattern. */ int -m88k_do_align (n, fill) +m88k_do_align (n, fill, len) int n; const char *fill; + int len; { - if ((fill == NULL || *fill == 0) + if ((fill == NULL || (*fill == 0 && len == 1)) && strcmp (obj_segment_name (now_seg), ".init") == 0) { static const unsigned char nop_pattern[] = { 0xf4, 0x00, 0x58, 0x00 }; diff --git a/gas/config/tc-m88k.h b/gas/config/tc-m88k.h index f938ee4..d96852e 100644 --- a/gas/config/tc-m88k.h +++ b/gas/config/tc-m88k.h @@ -1,8 +1,8 @@ - /* m88k.h -- Assembler for the Motorola 88000 Contributed by Devon Bowen of Buffalo University and Torbjorn Granlund of the Swedish Institute of Computer Science. - Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -98,7 +98,7 @@ struct reloc_info_m88k /* We use a special alignment function to insert the correct nop pattern in .init. */ -extern int m88k_do_align PARAMS ((int, const char *)); -#define md_do_align(n,fill,l) if (m88k_do_align(n,fill)) goto l +extern int m88k_do_align PARAMS ((int, const char *, int)); +#define md_do_align(n,fill,len,l) if (m88k_do_align(n,fill,len)) goto l #endif /* M88KCOFF */ diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index a64f818..66a789b 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -1,6 +1,6 @@ /* tc-sh.c -- Assemble code for the Hitachi Super-H - Copyright (C) 1993, 1994, 1995 Free Software Foundation. + Copyright (C) 1993, 94, 95, 1996 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -1697,11 +1697,12 @@ tc_coff_sizemachdep (frag) /* When we align the .text section, insert the correct NOP pattern. */ int -sh_do_align (n, fill) +sh_do_align (n, fill, len) int n; const char *fill; + int len; { - if ((fill == NULL || *fill == 0) + if ((fill == NULL || (*fill == 0 && len == 1)) && (now_seg == text_section #ifdef BFD_ASSEMBLER || (now_seg->flags & SEC_CODE) != 0 |