From owner-p4-projects@FreeBSD.ORG Mon Aug 14 20:14:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7850116A4DF; Mon, 14 Aug 2006 20:14:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53F9E16A4DE for ; Mon, 14 Aug 2006 20:14:25 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0277E43D49 for ; Mon, 14 Aug 2006 20:14:25 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7EKEOsb025516 for ; Mon, 14 Aug 2006 20:14:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7EKEOuN025513 for perforce@freebsd.org; Mon, 14 Aug 2006 20:14:24 GMT (envelope-from jb@freebsd.org) Date: Mon, 14 Aug 2006 20:14:24 GMT Message-Id: <200608142014.k7EKEOuN025513@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103898 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 20:14:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=103898 Change 103898 by jb@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);