diff options
Diffstat (limited to 'src/readelf.c')
| -rw-r--r-- | src/readelf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/readelf.c b/src/readelf.c index 40d49139..3ddd7c36 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -297,7 +297,7 @@ main (int argc, char *argv[]) do { /* Open the file. */ - int fd = open (argv[remaining], O_RDONLY); + int fd = open (argv[remaining], O_RDONLY | O_BINARY); if (fd == -1) { error (0, errno, gettext ("cannot open input file")); @@ -8418,7 +8418,6 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) may happen in some cases of the core items. */ static unsigned int -__attribute__ ((format (printf, 6, 7))) print_core_item (unsigned int colno, char sep, unsigned int wrap, size_t name_width, const char *name, const char *format, ...) { @@ -9247,7 +9246,9 @@ handle_siginfo_note (Elf *core, GElf_Word descsz, GElf_Off desc_pos) case SIGILL: case SIGFPE: case SIGSEGV: +#ifdef SIGBUS case SIGBUS: +#endif { uint64_t addr; if (! buf_read_ulong (core, &ptr, end, &addr)) @@ -9258,6 +9259,7 @@ handle_siginfo_note (Elf *core, GElf_Word descsz, GElf_Off desc_pos) default: ; } +#ifdef SI_USER else if (si_code == SI_USER) { int pid, uid; @@ -9266,6 +9268,7 @@ handle_siginfo_note (Elf *core, GElf_Word descsz, GElf_Off desc_pos) goto fail; printf (" sender PID: %d, sender UID: %d\n", pid, uid); } +#endif } static void |
