Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elfnn-riscv.c
index 8fcb1067fd6b5332adc53c02928db7f5b6c154f4..473bf50f2de75272215e1f189c5aa0286f78ea3c 100644 (file)
@@ -4161,15 +4161,16 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec,
              symval = 0;
              sym_sec = bfd_und_section_ptr;
            }
-         else if (h->root.u.def.section->output_section == NULL
-                  || (h->root.type != bfd_link_hash_defined
-                      && h->root.type != bfd_link_hash_defweak))
-           continue;
-         else
+         else if ((h->root.type == bfd_link_hash_defined
+                   || h->root.type == bfd_link_hash_defweak)
+                  && h->root.u.def.section != NULL
+                  && h->root.u.def.section->output_section != NULL)
            {
              symval = h->root.u.def.value;
              sym_sec = h->root.u.def.section;
            }
+         else
+           continue;
 
          if (h->type != STT_FUNC)
            reserve_size =
This page took 0.024677 seconds and 4 git commands to generate.