From 321d76167839c120f005b748651721f725e650c8 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 19 Dec 2003 10:01:59 +0000 Subject: [PATCH] Do not mark .reloc sections as containing debug info. --- bfd/ChangeLog | 5 +++++ bfd/coffcode.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d818058a3..0401565ab 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-12-19 Danny Smith + + * coffcode.h (styp_to_sec_flags): Don't treat .reloc section + as SEC_DEBUGGING. + 2003-12-18 Richard Sandiford * elf32-mips.c (elf_mips_howto_table_rel): Replace all uses of diff --git a/bfd/coffcode.h b/bfd/coffcode.h index ccac05bca..15d97093f 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; -- 2.11.4.GIT