* coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on

STYP_NOLOAD bit.
	* coff-z8k.c: delete unused reloc functions
This commit is contained in:
Steve Chamberlain 1993-01-08 23:21:26 +00:00
parent dadd414a89
commit 47cf499721
2 changed files with 60 additions and 31 deletions

View file

@ -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.

View file

@ -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