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]

PR21910, segfault in common symbol override test when hash-style=gnu


	PR 21910
	* elflink.c (bfd_elf_final_link): Don't segfault when sections
	needed to define various tags have been discarded.

diff --git a/bfd/elflink.c b/bfd/elflink.c
index 0cc5f87..b89d537 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -12342,7 +12342,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
 	    get_vma:
 	      o = bfd_get_linker_section (dynobj, name);
 	    do_vma:
-	      if (o == NULL)
+	      if (o == NULL || bfd_is_abs_section (o->output_section))
 		{
 		  _bfd_error_handler
 		    (_("could not find section %s"), name);

-- 
Alan Modra
Australia Development Lab, IBM


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