aboutsummaryrefslogtreecommitdiff
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
commitc4bf77942dea9cad22426964bf32c46cbc443705 (patch)
treee552c4a92b110af91ebbc4f5d65feda34520b281
parenta2379359b4aef4f03b1be53bbc76518b9ff4cf2b (diff)
downloadgdb-c4bf77942dea9cad22426964bf32c46cbc443705.zip
gdb-c4bf77942dea9cad22426964bf32c46cbc443705.tar.gz
gdb-c4bf77942dea9cad22426964bf32c46cbc443705.tar.bz2
Do not mark .reloc sections as containing debug info.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/coffcode.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d818058..0401565 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-19 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * coffcode.h (styp_to_sec_flags): Don't treat .reloc section
+ as SEC_DEBUGGING.
+
2003-12-18 Richard Sandiford <rsandifo@redhat.com>
* elf32-mips.c (elf_mips_howto_table_rel): Replace all uses of
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index ccac05b..15d9709 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;