summaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-12-19 10:01:59 +0000
committerNick Clifton <nickc@redhat.com>2003-12-19 10:01:59 +0000
commit23e0c381fa0aeac917554697e45a029cd86eda0d (patch)
tree345224760732552999f65354930ebc50e7ebefd2 /bfd/coffcode.h
parentaa0d60e039ff6bf0f83126447dd5590daba52fe6 (diff)
downloadgdb-23e0c381fa0aeac917554697e45a029cd86eda0d.tar.gz
Do not mark .reloc sections as containing debug info.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index ccac05bcaec..15d97093f67 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1064,7 +1064,11 @@ styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
sec_flags &= ~ SEC_READONLY;
break;
case IMAGE_SCN_MEM_DISCARDABLE:
- sec_flags |= SEC_DEBUGGING;
+ /* The MS PE spec sets the DISCARDABLE flag on .reloc sections
+ but we do not want them to be labelled as debug section, since
+ then strip would remove them. */
+ if (strncmp (name, ".reloc", sizeof ".reloc" - 1) != 0)
+ sec_flags |= SEC_DEBUGGING;
break;
case IMAGE_SCN_MEM_SHARED:
sec_flags |= SEC_SHARED;