aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-08-08 16:50:27 +0000
committerIan Lance Taylor <ian@airs.com>1999-08-08 16:50:27 +0000
commitbd826630b1258af33355c6d6906ce42111b2f8fb (patch)
tree0f6f9940b078ecb7cf94a0b8748ce79d3835a089 /bfd/coffcode.h
parent153b546a7abff2e8a966718a0dfa784a64975877 (diff)
downloadgdb-bd826630b1258af33355c6d6906ce42111b2f8fb.zip
gdb-bd826630b1258af33355c6d6906ce42111b2f8fb.tar.gz
gdb-bd826630b1258af33355c6d6906ce42111b2f8fb.tar.bz2
1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
* section.c (SEC_SHARED): Define. * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED. (styp_to_sec_flags): Likewise. * peicode.h (coff_swap_scnhdr_out): Likewise. * bfd-in2.h: Rebuild. 1999-08-08 Ian Lance Taylor <ian@zembu.com> * coffcode.h (coff_classify_symbol): Comment out part of 1999-08-05 change which breaks cygwin DLLs.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index cc7b148..301e5f7 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -445,6 +445,8 @@ sec_to_styp_flags (sec_name, sec_flags)
#ifdef COFF_WITH_PE
if (sec_flags & SEC_LINK_ONCE)
styp_flags |= IMAGE_SCN_LNK_COMDAT;
+ if (sec_flags & SEC_SHARED)
+ styp_flags |= IMAGE_SCN_MEM_SHARED;
#endif
return (styp_flags);
@@ -579,6 +581,9 @@ styp_to_sec_flags (abfd, hdr, name)
if (styp_flags & IMAGE_SCN_LNK_REMOVE)
sec_flags |= SEC_EXCLUDE;
+ if (styp_flags & IMAGE_SCN_MEM_SHARED)
+ sec_flags |= SEC_SHARED;
+
if (styp_flags & IMAGE_SCN_LNK_COMDAT)
{
sec_flags |= SEC_LINK_ONCE;
@@ -3911,6 +3916,10 @@ coff_classify_symbol (abfd, syment)
return COFF_SYMBOL_LOCAL;
}
+#if 0
+ /* This is correct for Microsoft generated objects, but it
+ breaks gas generated objects. */
+
if (syment->n_value == 0)
{
asection *sec;
@@ -3923,6 +3932,7 @@ coff_classify_symbol (abfd, syment)
== 0))
return COFF_SYMBOL_PE_SECTION;
}
+#endif
return COFF_SYMBOL_LOCAL;
}