aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1992-11-06 00:38:59 +0000
committerIan Lance Taylor <ian@airs.com>1992-11-06 00:38:59 +0000
commit8f718ed3bd01421aa4b28fb0d9c9299825437258 (patch)
tree376f996e5c227820520de44f91e435899aae5859 /bfd/coffcode.h
parent4e084cde32061bb4b3a3d437e956055e66174ed8 (diff)
downloadgdb-8f718ed3bd01421aa4b28fb0d9c9299825437258.zip
gdb-8f718ed3bd01421aa4b28fb0d9c9299825437258.tar.gz
gdb-8f718ed3bd01421aa4b28fb0d9c9299825437258.tar.bz2
Thu Nov 5 15:34:19 1992 Ian Lance Taylor (ian@cygnus.com)
* section.c: New section bit SEC_SHARED_LIBRARY. coffcode.h (styp_to_sec_flags): if STYP_NOLOAD && (STYP_TEXT || STYP_DATA), set SEC_SHARED_LIBRARY. This seems to be correct for i386-sysv.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 4f615dd..29b83ff 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -399,9 +399,21 @@ DEFUN(styp_to_sec_flags, (styp_flags),
}
#endif /* STYP_NOLOAD */
- if ((styp_flags & STYP_TEXT) || (styp_flags & STYP_DATA))
+ /* For 386 COFF, at least, an unloadable text or data section is
+ actually a shared library section. */
+ if (styp_flags & STYP_TEXT)
{
- sec_flags |= SEC_LOAD | SEC_ALLOC;
+ if (sec_flags & SEC_NEVER_LOAD)
+ sec_flags |= SEC_CODE | SEC_SHARED_LIBRARY;
+ else
+ sec_flags |= SEC_CODE | SEC_LOAD | SEC_ALLOC;
+ }
+ else if (styp_flags & STYP_DATA)
+ {
+ if (sec_flags & SEC_NEVER_LOAD)
+ sec_flags |= SEC_DATA | SEC_SHARED_LIBRARY;
+ else
+ sec_flags |= SEC_DATA | SEC_LOAD | SEC_ALLOC;
}
else if (styp_flags & STYP_BSS)
{