aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2005-12-04 01:37:39 +0000
committerNed Ludd <solar@gentoo.org>2005-12-04 01:37:39 +0000
commit697ad926585d118828a54d93cbc7e068960e2080 (patch)
treec1551fabe703d55de449792bbce8f699ea12c8b7 /dumpelf.c
parentflesh out more of mach-o support (disabled for now) (diff)
downloadpax-utils-697ad926585d118828a54d93cbc7e068960e2080.tar.gz
pax-utils-697ad926585d118828a54d93cbc7e068960e2080.tar.bz2
pax-utils-697ad926585d118828a54d93cbc7e068960e2080.zip
- add dumping of .interp/.comment when --verbose
Diffstat (limited to 'dumpelf.c')
-rw-r--r--dumpelf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/dumpelf.c b/dumpelf.c
index a0750fc..bd07ae1 100644
--- a/dumpelf.c
+++ b/dumpelf.c
@@ -1,7 +1,7 @@
/*
* Copyright 2005 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/dumpelf.c,v 1.13 2005/10/13 01:53:55 vapier Exp $
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/dumpelf.c,v 1.14 2005/12/04 01:37:39 solar Exp $
*
* Copyright 2005 Ned Ludd - <solar@gentoo.org>
* Copyright 2005 Mike Frysinger - <vapier@gentoo.org>
@@ -22,7 +22,7 @@
#include "paxinc.h"
-static const char *rcsid = "$Id: dumpelf.c,v 1.13 2005/10/13 01:53:55 vapier Exp $";
+static const char *rcsid = "$Id: dumpelf.c,v 1.14 2005/12/04 01:37:39 solar Exp $";
#define argv0 "dumpelf"
/* prototypes */
@@ -210,12 +210,13 @@ static void dump_shdr(elfobj *elf, void *shdr_void, long shdr_cnt, char *name)
printf("\t.sh_addralign = %-10li ,\n", (long)EGET(shdr->sh_addralign)); \
printf("\t.sh_entsize = %-10li\n", (long)EGET(shdr->sh_entsize)); \
if (size && \
- ((be_verbose && type == SHT_STRTAB) || \
+ ((be_verbose && (type == SHT_STRTAB || (type == SHT_PROGBITS && \
+ (strcmp(name, ".comment") == 0 || strcmp(name, ".interp") == 0) ))) || \
(be_verbose > 1))) { \
unsigned char *data = (unsigned char*)(elf->data + EGET(shdr->sh_offset)); \
char bool; \
printf("\n\t/* section dump:\n"); \
- if (type == SHT_STRTAB) { \
+ if (type == SHT_STRTAB || type == SHT_PROGBITS) { \
bool = 1; \
for (i = 0; i < size; ++i) { \
++data; \