From 3eb802b53a5ba8808c3da1f2bdfe7066e9cca50d Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 16 Dec 1992 20:13:53 +0000 Subject: [PATCH] Wed Dec 16 12:12:33 1992 Ian Lance Taylor (ian@cygnus.com) * write.c, obj-ieee.c: don't define SUB_SEGMENT_ALIGN if it is already defined. --- gas/ChangeLog | 5 ++++ gas/config/obj-ieee.c | 2 ++ gas/write.c | 60 +++++++++++++++++++++---------------------- 3 files changed, 36 insertions(+), 31 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index e54807cf1ae..29deb01a0c5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Wed Dec 16 12:12:33 1992 Ian Lance Taylor (ian@cygnus.com) + + * write.c, obj-ieee.c: don't define SUB_SEGMENT_ALIGN if it is + already defined. + Tue Dec 15 12:40:11 1992 Steve Chamberlain (sac@thepub.cygnus.com) * app.c (do_scrub_begin): allow single quote strings if so diff --git a/gas/config/obj-ieee.c b/gas/config/obj-ieee.c index 3e1965c8530..1b45da9ead7 100644 --- a/gas/config/obj-ieee.c +++ b/gas/config/obj-ieee.c @@ -545,7 +545,9 @@ DEFUN_VOID (write_object_file) frag */ subseg_new (frchain_ptr->frch_seg, frchain_ptr->frch_subseg); +#ifndef SUB_SEGMENT_ALIGN #define SUB_SEGMENT_ALIGN 2 +#endif frag_align (SUB_SEGMENT_ALIGN, 0); frag_wane (frag_now); frag_now->fr_fix = 0; diff --git a/gas/write.c b/gas/write.c index 4ee88c22ffa..86ca81dd4f3 100644 --- a/gas/write.c +++ b/gas/write.c @@ -51,7 +51,9 @@ static char *the_object_file; char *next_object_file_charP; /* Tracks object file bytes. */ +#ifndef OBJ_VMS int magic_number_for_object_file = DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE; +#endif static int is_dnrange PARAMS ((struct frag * f1, struct frag * f2)); static long fixup_segment PARAMS ((fixS * fixP, segT this_segment_type)); @@ -154,26 +156,28 @@ write_object_file () long object_file_size; -#ifdef VMS +#ifdef OBJ_VMS /* - * Under VMS we try to be compatible with VAX-11 "C". Thus, we - * call a routine to check for the definition of the procedure - * "_main", and if so -- fix it up so that it can be program - * entry point. - */ + * Under VMS we try to be compatible with VAX-11 "C". Thus, we + * call a routine to check for the definition of the procedure + * "_main", and if so -- fix it up so that it can be program + * entry point. + */ VMS_Check_For_Main (); #endif /* VMS */ /* - * After every sub-segment, we fake an ".align ...". This conforms to - * BSD4.2 brane-damage. We then fake ".fill 0" because that is the - * kind of frag that requires least thought. ".align" frags like to - * have a following frag since that makes calculating their intended - * length trivial. - */ + * After every sub-segment, we fake an ".align ...". This conforms to + * BSD4.2 brane-damage. We then fake ".fill 0" because that is the + * kind of frag that requires least thought. ".align" frags like to + * have a following frag since that makes calculating their intended + * length trivial. + */ +#ifndef SUB_SEGMENT_ALIGN #define SUB_SEGMENT_ALIGN (2) +#endif for (frchainP = frchain_root; frchainP; frchainP = frchainP->frch_next) { -#ifdef VMS +#ifdef OBJ_VMS /* * Under VAX/VMS, the linker (and PSECT specifications) * take care of correctly aligning the segments. @@ -528,12 +532,12 @@ write_object_file () } #endif /* not WORKING_DOT_WORD */ -#ifndef VMS +#ifndef OBJ_VMS { /* not vms */ /* - * Scan every FixS performing fixups. We had to wait until now to do - * this because md_convert_frag() may have made some fixSs. - */ + * Scan every FixS performing fixups. We had to wait until now to do + * this because md_convert_frag() may have made some fixSs. + */ int trsize, drsize; subseg_change (SEG_TEXT, 0); @@ -623,14 +627,14 @@ write_object_file () know ((next_object_file_charP - the_object_file) == (H_GET_HEADER_SIZE (&headers) + H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers) + H_GET_TEXT_RELOCATION_SIZE (&headers) + H_GET_DATA_RELOCATION_SIZE (&headers) + H_GET_LINENO_SIZE (&headers))); /* - * Emit symbols. - */ + * Emit symbols. + */ obj_emit_symbols (&next_object_file_charP, symbol_rootP); know ((next_object_file_charP - the_object_file) == (H_GET_HEADER_SIZE (&headers) + H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers) + H_GET_TEXT_RELOCATION_SIZE (&headers) + H_GET_DATA_RELOCATION_SIZE (&headers) + H_GET_LINENO_SIZE (&headers) + H_GET_SYMBOL_TABLE_SIZE (&headers))); /* - * Emit strings. - */ + * Emit strings. + */ if (string_byte_count > 0) { @@ -654,9 +658,10 @@ write_object_file () } /* non vms output */ #else /* VMS */ /* - * Now do the VMS-dependent part of writing the object file - */ - VMS_write_object_file (text_siz, data_siz, text_frag_root, data_frag_root); + * Now do the VMS-dependent part of writing the object file + */ + VMS_write_object_file (H_GET_TEXT_SIZE (&headers), data_siz, + text_frag_root, data_frag_root); #endif /* VMS */ } /* write_object_file() */ @@ -1311,11 +1316,4 @@ record_alignment (seg, align) return; } /* record_alignment() */ -/* - * Local Variables: - * comment-column: 0 - * fill-column: 131 - * End: - */ - /* end of write.c */ -- 2.30.2