From: Steve Chamberlain Date: Fri, 8 Jan 1993 23:21:26 +0000 (+0000) Subject: * coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47cf499721d0133520e18bc5447d91dab17ef05f;p=binutils-gdb.git * coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on STYP_NOLOAD bit. * coff-z8k.c: delete unused reloc functions --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 33e1a0a98e2..005ea602c3b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +Fri Jan 8 15:20:00 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on + STYP_NOLOAD bit. + * coff-z8k.c: delete unused reloc functions + Fri Jan 8 15:47:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * bfd.c (struct _bfd): Added ecoff_tdata to tdata union. diff --git a/bfd/coffcode.h b/bfd/coffcode.h index c2c65e7304a..fe3fe0fff0d 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -307,47 +307,70 @@ DEFUN(sec_to_styp_flags, (sec_name, sec_flags), CONST char * sec_name AND flagword sec_flags) { - long styp_flags = 0; + long styp_flags = 0; - if (!strcmp(sec_name, _TEXT)) { - return((long)STYP_TEXT); - } else if (!strcmp(sec_name, _DATA)) { - return((long)STYP_DATA); + if (!strcmp(sec_name, _TEXT)) + { + styp_flags = STYP_TEXT; + } + else if (!strcmp(sec_name, _DATA)) + { + styp_flags = STYP_DATA; #ifdef TWO_DATA_SECS - } else if (!strcmp(sec_name, ".data2")) { - return((long)STYP_DATA); -#endif /* TWO_DATA_SECS */ - } else if (!strcmp(sec_name, _BSS)) { - return((long)STYP_BSS); + } + else if (!strcmp(sec_name, ".data2")) + { + styp_flags = STYP_DATA; +#endif /* TWO_DATA_SECS */ + } + else if (!strcmp(sec_name, _BSS)) + { + styp_flags = STYP_BSS; #ifdef _COMMENT - } else if (!strcmp(sec_name, _COMMENT)) { - return((long)STYP_INFO); -#endif /* _COMMENT */ + } + else if (!strcmp(sec_name, _COMMENT)) + { + styp_flags = STYP_INFO; +#endif /* _COMMENT */ #ifdef _LIB - } else if (!strcmp(sec_name, _LIB)) { - return((long)STYP_LIB); -#endif /* _LIB */ - } + } + else if (!strcmp(sec_name, _LIB)) + { + styp_flags = STYP_LIB; +#endif /* _LIB */ -/* Try and figure out what it should be */ - if (sec_flags & SEC_CODE) styp_flags = STYP_TEXT; - if (sec_flags & SEC_DATA) styp_flags = STYP_DATA; - else if (sec_flags & SEC_READONLY) -#ifdef STYP_LIT /* 29k readonly text/data section */ - styp_flags = STYP_LIT; + } + /* Try and figure out what it should be */ + else if (sec_flags & SEC_CODE) + { + styp_flags = STYP_TEXT; + } + else if (sec_flags & SEC_DATA) + { + styp_flags = STYP_DATA; + } + else if (sec_flags & SEC_READONLY) + { +#ifdef STYP_LIT /* 29k readonly text/data section */ + styp_flags = STYP_LIT; #else - styp_flags = STYP_TEXT; -#endif /* STYP_LIT */ - else if (sec_flags & SEC_LOAD) styp_flags = STYP_TEXT; - - if (styp_flags == 0) styp_flags = STYP_BSS; + styp_flags = STYP_TEXT; +#endif /* STYP_LIT */ + } + else if (sec_flags & SEC_LOAD) + { + styp_flags = STYP_TEXT; + } + else { + styp_flags = STYP_BSS; + } #ifdef STYP_NOLOAD - if (sec_flags & SEC_NEVER_LOAD) - styp_flags |= STYP_NOLOAD; + if (sec_flags & SEC_NEVER_LOAD) + styp_flags |= STYP_NOLOAD; #endif - return(styp_flags); + return(styp_flags); } /* * Return a word with SEC_* flags set to represent the incoming