* osabi.c: Update copyright year.
authorMark Kettenis <kettenis@gnu.org>
Fri, 2 Jul 2004 21:27:17 +0000 (21:27 +0000)
committerMark Kettenis <kettenis@gnu.org>
Fri, 2 Jul 2004 21:27:17 +0000 (21:27 +0000)
(generic_elf_osabi_sniffer): Tweak comment.  Look for OS-specific
notes if EI_OSABI is set to ELFOSABI_HPUX.

gdb/ChangeLog
gdb/osabi.c

index e66a8da1d26f1c4647f3a33dba47850d2172883c..c5acbc816d771a927031bcc9f897b1303cfed804 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-02  Mark Kettenis  <kettenis@gnu.org>
+
+       * osabi.c: Update copyright year.
+       (generic_elf_osabi_sniffer): Tweak comment.  Look for OS-specific
+       notes if EI_OSABI is set to ELFOSABI_HPUX.
+
 2004-07-01  Michael Snyder  <msnyder@redhat.com>
 
        * win32-nat.c (core_dll_symbols_add): Re-indent a small section
index 3acfc703648e8611c91f136e8312fd89a2b6c024..ea84456cc7bd5e27930c2de51c23ba3edf7af502 100644 (file)
@@ -1,5 +1,6 @@
 /* OS ABI variant handling for GDB.
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+
+   Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -501,10 +502,11 @@ generic_elf_osabi_sniffer (bfd *abfd)
   switch (elfosabi)
     {
     case ELFOSABI_NONE:
-      /* When elfosabi is ELFOSABI_NONE (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 notes that have been added.  */
+      /* When the EI_OSABI field in the ELF header is ELFOSABI_NONE
+         (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);
@@ -531,7 +533,14 @@ generic_elf_osabi_sniffer (bfd *abfd)
       break;
 
     case 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).  We use HP-UX ELF as the default, but let any
+         OS-specific notes override this.  */
       osabi = GDB_OSABI_HPUX_ELF;
+      bfd_map_over_sections (abfd,
+                            generic_elf_osabi_sniff_abi_tag_sections,
+                            &osabi);
       break;
     }
 
This page took 0.029459 seconds and 4 git commands to generate.