diff options
author | Steve Chamberlain <sac@cygnus> | 1993-01-08 23:21:26 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1993-01-08 23:21:26 +0000 |
commit | 47cf499721d0133520e18bc5447d91dab17ef05f (patch) | |
tree | 295d3b4f78a769840fc386a49425a2a450e0a44c | |
parent | dadd414a8917bf3d2e813d7ff0706fa7aaa8958c (diff) | |
download | gdb-47cf499721d0133520e18bc5447d91dab17ef05f.zip gdb-47cf499721d0133520e18bc5447d91dab17ef05f.tar.gz gdb-47cf499721d0133520e18bc5447d91dab17ef05f.tar.bz2 |
* coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on
STYP_NOLOAD bit.
* coff-z8k.c: delete unused reloc functions
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/coffcode.h | 85 |
2 files changed, 60 insertions, 31 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 33e1a0a..005ea60 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 c2c65e7..fe3fe0f 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 |