From af438bdb10fcdce822df9a5181d649e4f9ba14ef Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 9 Jun 1997 16:53:45 +0000 Subject: [PATCH] * config/tc-m68k.c (md_section_align): If a.out and BFD, force section size to be aligned. --- gas/ChangeLog | 5 +++++ gas/config/tc-m68k.c | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 53253b4801f..0421420600c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 9 12:52:44 1997 Ian Lance Taylor + + * config/tc-m68k.c (md_section_align): If a.out and BFD, force + section size to be aligned. + Fri Jun 6 17:15:55 1997 Ian Lance Taylor * config/tc-sh.h (md_cons_align): Define. diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 8d2b508cc56..04f5038b36f 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -2373,6 +2373,7 @@ m68k_ip (instring) tmpreg &= 0xFF; case '8': case 'C': + case 'j': install_operand (s[1], tmpreg); break; default: @@ -4855,7 +4856,11 @@ mri_chip () int i; s = input_line_pointer; - c = get_symbol_end (); + /* We can't use get_symbol_end since the processor names are not proper + symbols. */ + while (is_part_of_name (c = *input_line_pointer++)) + ; + *--input_line_pointer = 0; for (i = 0; i < n_archs; i++) if (strcasecmp (s, archs[i].name) == 0) break; @@ -4878,7 +4883,11 @@ mri_chip () { ++input_line_pointer; s = input_line_pointer; - c = get_symbol_end (); + /* We can't use get_symbol_end since the processor names are not + proper symbols. */ + while (is_part_of_name (c = *input_line_pointer++)) + ; + *--input_line_pointer = 0; if (strcmp (s, "68881") == 0) current_architecture |= m68881; else if (strcmp (s, "68851") == 0) @@ -6799,7 +6808,21 @@ md_section_align (segment, size) segT segment; valueT size; { - return size; /* Byte alignment is fine */ +#ifdef OBJ_AOUT +#ifdef BFD_ASSEMBLER + /* For a.out, force the section size to be aligned. If we don't do + this, BFD will align it for us, but it will not write out the + final bytes of the section. This may be a bug in BFD, but it is + easier to fix it here since that is how the other a.out targets + work. */ + int align; + + align = bfd_get_section_alignment (stdoutput, segment); + size = ((size + (1 << align) - 1) & ((valueT) -1 << align)); +#endif +#endif + + return size; } /* Exactly what point is a PC-relative offset relative TO? @@ -6821,6 +6844,8 @@ md_pcrel_from (fixP) } #ifndef BFD_ASSEMBLER +#ifdef OBJ_COFF + /*ARGSUSED*/ void tc_coff_symbol_emit_hook (ignore) @@ -6845,6 +6870,8 @@ tc_coff_sizemachdep (frag) return 0; } } + +#endif #endif /* end of tc-m68k.c */ -- 2.30.2