+ case MID_HP300:
+ break;
+
+#ifdef HPUXCOMPAT
+ case MID_HPUX:
+ /*
+ * Save a.out header. This is eventually saved in the pcb,
+ * but we cannot do that yet in case the exec fails before
+ * the image is overlayed.
+ */
+ bcopy((caddr_t)&exdata.ex_hexec,
+ (caddr_t)&hhead, sizeof hhead);
+ /*
+ * If version number is 0x2bad this is a native BSD
+ * binary created via the HPUX SGS. Should not be
+ * treated as an HPUX binary.
+ */
+ if (exdata.ex_hexec.ha_version != BSDVNUM)
+ flags |= SHPUX;
+ /*
+ * Shuffle important fields to their BSD locations.
+ * Note that the order in which this is done is important.
+ */
+ exdata.ex_exec.a_text = exdata.ex_hexec.ha_text;
+ exdata.ex_exec.a_data = exdata.ex_hexec.ha_data;
+ exdata.ex_exec.a_bss = exdata.ex_hexec.ha_bss;
+ exdata.ex_exec.a_entry = exdata.ex_hexec.ha_entry;
+ /*
+ * For ZMAGIC files, make sizes consistant with those
+ * generated by BSD ld.
+ */
+ if (exdata.ex_exec.a_magic == ZMAGIC) {
+ exdata.ex_exec.a_text =
+ ctob(btoc(exdata.ex_exec.a_text));
+ nc = exdata.ex_exec.a_data + exdata.ex_exec.a_bss;
+ exdata.ex_exec.a_data =
+ ctob(btoc(exdata.ex_exec.a_data));
+ nc -= (int)exdata.ex_exec.a_data;
+ exdata.ex_exec.a_bss = (nc < 0) ? 0 : nc;
+ }
+ break;
+#endif
+ }
+#endif
+ switch ((int)exdata.ex_exec.a_magic) {
+
+ case OMAGIC: