#include "readelf.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readelf.c,v 1.63 2007/01/16 14:56:45 ljt Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.64 2007/09/26 20:42:55 christos Exp $")
#endif
#ifdef ELFCORE
#ifdef ELFCORE
size_t prpsoffsets32[] = {
8, /* FreeBSD */
- 28, /* Linux 2.0.36 (short name) */
44, /* Linux (path name) */
+ 28, /* Linux 2.0.36 (short name) */
84, /* SunOS 5.x */
};
size_t prpsoffsets64[] = {
16, /* FreeBSD, 64-bit */
- 40, /* Linux (tested on core from 2.4.x, short name) */
56, /* Linux (path name) */
+ 40, /* Linux (tested on core from 2.4.x, short name) */
120, /* SunOS 5.x, 64-bit */
};
#define FLAGS_DID_CORE 1
#define FLAGS_DID_NOTE 2
+#define FLAGS_DID_CORE_STYLE 4
private int
dophn_core(struct magic_set *ms, int class, int swap, int fd, off_t off,
if ((*flags & FLAGS_DID_CORE) != 0)
return size;
- if (os_style != -1) {
+ if (os_style != -1 && (*flags & FLAGS_DID_CORE_STYLE) == 0) {
if (file_printf(ms, ", %s-style", os_style_names[os_style])
== -1)
return size;
+ *flags |= FLAGS_DID_CORE_STYLE;
}
switch (os_style) {
if (file_printf(ms, " (signal %u)",
getu32(swap, signo)) == -1)
return size;
+ *flags |= FLAGS_DID_CORE;
return size;
}
break;
if (file_printf(ms, ", from '%.16s'",
&nbuf[doff + prpsoffsets(i)]) == -1)
return size;
+ *flags |= FLAGS_DID_CORE;
return size;
tryanother:
break;
}
#endif
- *flags |= FLAGS_DID_CORE;
return offset;
}