Print this page
file: support DT_SUNW_KMOD usefully

@@ -24,12 +24,10 @@
  */
 
 #ifndef _ELF_READ_H
 #define _ELF_READ_H
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #define BUFSZ 128
 typedef struct Elf_Info {
         boolean_t       dynamic;        /* dymanically linked? */
         unsigned        core_type;      /* core? what type of core? */
         unsigned        stripped;       /* symtab, debug info */

@@ -38,10 +36,11 @@
         unsigned        type;           /* e_type */
         int             elffd;          /* fd of file being processed */
         char            fname[PRFNSZ];  /* name of process that dumped core */
         char            cap_str[BUFSZ]; /* hw/sw capabilities */
         char            *file;          /* file being processed */
+        boolean_t       kmod;
 } Elf_Info;
 
 /* values for Elf_Info.stripped */
 #define E_DBGINF        0x01
 #define E_SYMTAB        0x02

@@ -55,10 +54,14 @@
 /* elf file processing errors */
 #define ELF_ERR_ELFCAP1 gettext("%s: %s zero size or zero entry ELF " \
                             "section - ELF capabilities ignored\n")
 #define ELF_ERR_ELFCAP2 gettext("%s: %s: can't read ELF capabilities " \
                             "data - ELF capabilities ignored\n")
+#define ELF_ERR_DYNAMIC1        gettext("%s: %s zero size or zero entry ELF " \
+        "section - ELF dynamic tags ignored\n")
+#define ELF_ERR_DYNAMIC2        gettext("%s: %s: can't read ELF dynamic " \
+        "data - ELF dynamic tags ignored\n")
 
 extern int is_in_list(char *str);
 
 /* return status for elf_read and its helper functions */
 #define ELF_READ_OKAY 1

@@ -70,10 +73,11 @@
 #define Elf_Shdr        Elf64_Shdr
 #define Elf_Phdr        Elf64_Phdr
 #define Elf_Cap         Elf64_Cap
 #define Elf_Nhdr        Elf64_Nhdr
 #define Elf_Word        Elf64_Word
+#define Elf_Dyn         Elf64_Dyn
 
 #define elf_read        elf_read64
 #define elf_xlatetom    elf64_xlatetom
 #define elf_fsize       elf64_fsize
 #define get_class       get_class64

@@ -86,10 +90,11 @@
 #define Elf_Shdr        Elf32_Shdr
 #define Elf_Phdr        Elf32_Phdr
 #define Elf_Cap         Elf32_Cap
 #define Elf_Nhdr        Elf32_Nhdr
 #define Elf_Word        Elf32_Word
+#define Elf_Dyn         Elf32_Dyn
 
 #define elf_read        elf_read32
 #define elf_xlatetom    elf32_xlatetom
 #define elf_fsize       elf32_fsize
 #define get_class       get_class32