]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf32-crx.c
Re: PR26978, Inconsistency for strong foo@v1 and weak foo@@v1
[thirdparty/binutils-gdb.git] / bfd / elf32-crx.c
index f041e4828ef3c8d3f7f866b05cf86ea58fa9ae02..e7912746be92ab66e903627c7e1a8ca873400b2a 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for National Semiconductor's CRX ELF
-   Copyright (C) 2004-2023 Free Software Foundation, Inc.
+   Copyright (C) 2004-2024 Free Software Foundation, Inc.
    Written by Tomer Levi, NSC, Israel.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -973,8 +973,9 @@ elf32_crx_relax_section (bfd *abfd, asection *sec,
      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;