]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix an internal compiler error when attempting to create a second $GDB_DEBUG$ section.
authorNick Clifton <nickc@redhat.com>
Thu, 13 Aug 2020 10:50:13 +0000 (11:50 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 13 Aug 2020 10:50:13 +0000 (11:50 +0100)
PR 26359
* config/obj-som.c (obj_som_init_stab_section): Do nothing if the
$GDB_DEBUG$ section has already been created.

gas/ChangeLog
gas/config/obj-som.c

index baa788f4fed06339923ed0b8b9dab6e9efef9b79..d9b57f8662b07a3755769cce9cd6aef1cd279eaf 100644 (file)
@@ -1,3 +1,9 @@
+2020-08-13  Nick Clifton  <nickc@redhat.com>
+
+       PR 26359
+       * config/obj-som.c (obj_som_init_stab_section): Do nothing if the
+       $GDB_DEBUG$ section has already been created.
+
 2020-08-12  Joe Ramsay  <joe.ramsay@.arm.com>
 
        * config/tc-arm.c (do_neon_cvt_1): Parse vcvtne as vcvt-ne for
index 82b0af420a7fe581f8bf5fc74dcf02e8819acded..b403cbdb5aaef8888b6e59de57ec0cb7c396ab54 100644 (file)
@@ -211,9 +211,13 @@ obj_som_init_stab_section (segT seg)
   segT space;
   subsegT saved_subseg = now_subseg;
   char *p;
- const char * file;
 const char * file;
   unsigned int stroff;
 
+  /* Nothing to do if the section has already been created.  */
+  if (bfd_get_section_by_name (stdoutput, "$GDB_DEBUG$"))
+    return;
+
   /* Make the space which will contain the debug subspaces.  */
   space = bfd_make_section_old_way (stdoutput, "$GDB_DEBUG$");