+ /* Check to see if the input BFD actually contains any sections.
+ If not, its flags may not have been initialised either, but it cannot
+ actually cause any incompatibility. */
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ /* Ignore synthetic sections and empty .text, .data and .bss sections
+ which are automatically generated by gas. */
+ if (strcmp (sec->name, ".reginfo")
+ && strcmp (sec->name, ".mdebug")
+ && ((!strcmp (sec->name, ".text")
+ || !strcmp (sec->name, ".data")
+ || !strcmp (sec->name, ".bss"))
+ && sec->_raw_size != 0))
+ {
+ null_input_bfd = false;
+ break;
+ }
+ }
+ if (null_input_bfd)
+ return true;
+