]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/objfiles: add comment explaining when obj_section::the_bfd_section is nullptr
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 27 Aug 2025 14:07:50 +0000 (10:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 28 Aug 2025 14:13:42 +0000 (10:13 -0400)
Change-Id: Iae17492f468efba7b76463a6ff8526171e412040
Reviewed-By: Tom de Vries <tdevries@suse.de>
gdb/objfiles.h

index bce85576e6c7fe910a063caaeac8f42a83172f3f..da9d2f3f9389afd111cfe958ea61f7960783f380 100644 (file)
@@ -395,7 +395,9 @@ struct obj_section
     return addr >= this->addr () && addr < endaddr ();
   }
 
-  /* BFD section pointer */
+  /* BFD section pointer.  This is nullptr if the corresponding BFD section is
+     not allocatable (!SEC_ALLOC), in which case this obj_section can be
+     considered NULL / empty.  */
   struct bfd_section *the_bfd_section;
 
   /* Objfile this section is part of.  */