summaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2011-09-27 16:03:46 +0000
committerKai Tietz <kai.tietz@onevision.com>2011-09-27 16:03:46 +0000
commitc941b96aa5ef0383b88b5c1595c9c36880f0a2c6 (patch)
tree4ee9a46cc003380e76c0cb02e9d1ddc3a4c90f2c /bfd/coffcode.h
parentc6eb346bbdb8ba56baaf2d56f1183cf755c0d120 (diff)
downloadbinutils-redhat-c941b96aa5ef0383b88b5c1595c9c36880f0a2c6.tar.gz
* coffcode.h (sec_to_styp_flags): Handle
SEC_LINK_DUPLICATES_SAME_CONTENTS, and SEC_LINK_DUPLICATES_SAME_SIZE.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 6f9685b4ee..62eeb20d76 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -670,7 +670,9 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags)
/* FIXME: There is no gas syntax to specify the debug section flag. */
if (is_dbg)
{
- sec_flags &= (SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD);
+ sec_flags &= (SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD
+ | SEC_LINK_DUPLICATES_SAME_CONTENTS
+ | SEC_LINK_DUPLICATES_SAME_SIZE);
sec_flags |= SEC_DEBUGGING | SEC_READONLY;
}
@@ -698,7 +700,11 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags)
/* skip SORT */
if (sec_flags & SEC_LINK_ONCE)
styp_flags |= IMAGE_SCN_LNK_COMDAT;
- /* skip LINK_DUPLICATES */
+ if ((sec_flags
+ & (SEC_LINK_DUPLICATES_DISCARD | SEC_LINK_DUPLICATES_SAME_CONTENTS
+ | SEC_LINK_DUPLICATES_SAME_SIZE)) != 0)
+ styp_flags |= IMAGE_SCN_LNK_COMDAT;
+
/* skip LINKER_CREATED */
if ((sec_flags & SEC_COFF_NOREAD) == 0)