This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Don't check relocations in excluded sections


When checking relocations after gc-sections has run, the unused sections
have been removed.  Don't check relocations in excluded sections.

OK for master?

H.J.
---
	* elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
	in excluded sections
---
 bfd/elflink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bfd/elflink.c b/bfd/elflink.c
index 5af334a..b432384 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3518,7 +3518,9 @@ _bfd_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info)
 	  Elf_Internal_Rela *internal_relocs;
 	  bfd_boolean ok;
 
+	  /* Don't check relocations in excluded sections.  */
 	  if ((o->flags & SEC_RELOC) == 0
+	      || (o->flags & SEC_EXCLUDE) != 0
 	      || o->reloc_count == 0
 	      || ((info->strip == strip_all || info->strip == strip_debugger)
 		  && (o->flags & SEC_DEBUGGING) != 0)
-- 
2.5.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]