- (0), then the ELF structures in the file are conforming to
- the base specification for that machine (there are no
- OS-specific extensions). In order to determine the real OS
- in use we must look for OS-specific notes. */
- bfd_map_over_sections (abfd,
- generic_elf_osabi_sniff_abi_tag_sections,
- &osabi);
+ (0), then the ELF structures in the file are conforming to
+ the base specification for that machine (there are no
+ OS-specific extensions). In order to determine the real OS
+ in use, we must look for OS-specific notes.
+
+ The same applies for ELFOSABI_GNU: this can mean GNU/Hurd,
+ GNU/Linux, and possibly more. */
+
+ /* And likewise ELFOSABI_HPUX. For some reason the default
+ value for the EI_OSABI field is ELFOSABI_HPUX for all PA-RISC
+ targets (with the exception of GNU/Linux). */
+ for (asection *sect : gdb_bfd_sections (abfd))
+ generic_elf_osabi_sniff_abi_tag_sections (abfd, sect, &osabi);