ELF: Don't check relocations in non-loaded, non-alloced sections
[deliverable/binutils-gdb.git] / bfd / elf-m10300.c
index 696514ab054c64824f6a81392748046b85608d33..5a0bb9f005af556c2995971885762be40c7df8cc 100644 (file)
@@ -2066,12 +2066,12 @@ mn10300_elf_relocate_section (bfd *output_bfd,
                      && elf_hash_table (info)->dynamic_sections_created
                      && !SYMBOL_REFERENCES_LOCAL (info, hh))
                  || (r_type == R_MN10300_32
+                     && !SYMBOL_REFERENCES_LOCAL (info, hh)
                      /* _32 relocs in executables force _COPY relocs,
                         such that the address of the symbol ends up
                         being local.  */
-                     && !bfd_link_executable (info)
-                     && !SYMBOL_REFERENCES_LOCAL (info, hh)
-                     && ((input_section->flags & SEC_ALLOC) != 0
+                     && (((input_section->flags & SEC_ALLOC) != 0
+                          && !bfd_link_executable (info))
                          /* DWARF will emit R_MN10300_32 relocations
                             in its sections against symbols defined
                             externally in shared libraries.  We can't
This page took 0.022997 seconds and 4 git commands to generate.