PERFORCE change 103898 for review

John Birrell jb at FreeBSD.org
Mon Aug 14 20:14:25 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=103898

Change 103898 by jb at jb_freebsd2 on 2006/08/14 20:14:11

	Add elfdump prototypes and flag definitions.
	
	Fix a prototype.

Affected files ...

.. //depot/projects/dtrace/src/lib/libelf/libelf.h#3 edit

Differences ...

==== //depot/projects/dtrace/src/lib/libelf/libelf.h#3 (text+ko) ====

@@ -140,6 +140,7 @@
 	ELF_E_NONE,	/* No error */
 	ELF_E_ARCHIVE,	/* Malformed ar(1) archive */
 	ELF_E_ARGUMENT,	/* Invalid argument */
+	ELF_E_CLASS,	/* ELF class mismatch */
 	ELF_E_HEADER,	/* Missing ELF header */
 	ELF_E_MMAP,	/* File mapping failed */
 	ELF_E_MODE,	/* Wrong mode for ELF descriptor */
@@ -159,9 +160,35 @@
 #define	ELF_F_LAYOUT	0x001	/* application will layout the file */
 #define	ELF_F_DIRTY	0x002	/* a section or ELF file is dirty */
 
+/*
+ * Flags passed to elf_dump().
+ */
+#define ELF_DUMP_CAP		(1 << 0)
+#define ELF_DUMP_CHECKSUM	(1 << 1)
+#define ELF_DUMP_DEMANGLE	(1 << 2)
+#define ELF_DUMP_DYN		(1 << 3)
+#define ELF_DUMP_EHDR		(1 << 4)
+#define ELF_DUMP_GOT		(1 << 5)
+#define ELF_DUMP_GROUP		(1 << 6)
+#define ELF_DUMP_HASH		(1 << 7)
+#define ELF_DUMP_INTERP		(1 << 8)
+#define ELF_DUMP_LONGNAME	(1 << 9)
+#define ELF_DUMP_MOVE		(1 << 10)
+#define ELF_DUMP_NOTE		(1 << 11)
+#define ELF_DUMP_PHDR		(1 << 12)
+#define ELF_DUMP_RELOC		(1 << 13)
+#define ELF_DUMP_SHDR		(1 << 14)
+#define ELF_DUMP_SYMBOLS	(1 << 15)
+#define ELF_DUMP_SYMINFO	(1 << 16)
+#define ELF_DUMP_UNWIND		(1 << 17)
+#define ELF_DUMP_VERSIONS	(1 << 18)
+
 __BEGIN_DECLS
 Elf		*elf_begin(int _fd, Elf_Cmd _cmd, Elf *_elf);
 int		elf_cntl(Elf *_elf, Elf_Cmd _cmd);
+int		elf_dump(const char *_elf_file, const char *name,
+		    const char *_outfile, unsigned int _flags);
+int		elf_dump_argv(int _argc, char **_argv);
 int		elf_end(Elf *_elf);
 const char	*elf_errmsg(int _error);
 int		elf_errno(void);
@@ -193,7 +220,7 @@
 Elf_Data	*elf_rawdata(Elf_Scn *_scn, Elf_Data *_data);
 char		*elf_rawfile(Elf *_elf, size_t *_size);
 char		*elf_strptr(Elf *_elf, size_t _section, size_t _offset);
-off_t		elf_update(Elf *_elf, Elf_Cmd *_cmd);
+off_t		elf_update(Elf *_elf, Elf_Cmd _cmd);
 unsigned int	elf_version(unsigned int _version);
 
 long		elf32_checksum(Elf *_elf);


More information about the p4-projects mailing list