]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf32-rl78.c
Test SEC_HAS_CONTENTS in relax routines
[thirdparty/binutils-gdb.git] / bfd / elf32-rl78.c
index 6adc495115f3f62c19fb907fc949d5be21485d3c..c7a94f2a28055cfeee33e860258a7de997717bed 100644 (file)
@@ -2106,8 +2106,9 @@ rl78_elf_relax_section (bfd *abfd,
      this section does not have relocs, or if this is not a
      code section.  */
   if (bfd_link_relocatable (link_info)
-      || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
+      || (sec->flags & SEC_RELOC) == 0
+      || (sec->flags & SEC_HAS_CONTENTS) == 0
       || (sec->flags & SEC_CODE) == 0)
     return true;