Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/elf2ecoff ignore the abiflags section
details: https://anonhg.NetBSD.org/src/rev/d4390accd9fa
branches: trunk
changeset: 347569:d4390accd9fa
user: christos <christos%NetBSD.org@localhost>
date: Sat Sep 03 11:35:24 2016 +0000
description:
ignore the abiflags section
diffstat:
usr.bin/elf2ecoff/elf2ecoff.c | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diffs (47 lines):
diff -r 92268e7eb133 -r d4390accd9fa usr.bin/elf2ecoff/elf2ecoff.c
--- a/usr.bin/elf2ecoff/elf2ecoff.c Sat Sep 03 11:34:47 2016 +0000
+++ b/usr.bin/elf2ecoff/elf2ecoff.c Sat Sep 03 11:35:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: elf2ecoff.c,v 1.29 2013/11/10 17:14:25 christos Exp $ */
+/* $NetBSD: elf2ecoff.c,v 1.30 2016/09/03 11:35:24 christos Exp $ */
/*
* Copyright (c) 1997 Jonathan Stone
@@ -217,23 +217,25 @@
(int (*) (const void *, const void *)) phcmp);
for (i = 0; i < ex.e_phnum; i++) {
- /* Section types we can ignore... */
- if (ph[i].p_type == PT_NULL || ph[i].p_type == PT_NOTE ||
- ph[i].p_type == PT_PHDR ||
- ph[i].p_type == PT_MIPS_REGINFO) {
-
+ switch (ph[i].p_type) {
+ case PT_NOTE:
+ case PT_NULL:
+ case PT_PHDR:
+ case PT_MIPS_ABIFLAGS:
+ case PT_MIPS_REGINFO:
+ /* Section types we can ignore... */
if (debug) {
- fprintf(stderr, " skipping PH %zu type %d "
- "flags 0x%x\n",
+ fprintf(stderr, " skipping PH %zu type %#x "
+ "flags %#x\n",
i, ph[i].p_type, ph[i].p_flags);
}
continue;
+ default:
+ /* Section types we can't handle... */
+ if (ph[i].p_type != PT_LOAD)
+ errx(1, "Program header %zu type %#x can't be "
+ "converted", i, ph[i].p_type);
}
- /* Section types we can't handle... */
- else
- if (ph[i].p_type != PT_LOAD)
- errx(1, "Program header %zu type %d can't be "
- "converted", i, ph[i].p_type);
/* Writable (data) segment? */
if (ph[i].p_flags & PF_W) {
struct sect ndata, nbss;
Home |
Main Index |
Thread Index |
Old Index