Remove an old hack I noticed years ago, but never committed.

This commit is contained in:
Warner Losh 2012-06-28 07:33:43 +00:00
parent cfe4885cf8
commit f4dc9a4015
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237694
3 changed files with 7 additions and 8 deletions

View File

@ -174,9 +174,9 @@ exec_aout_imgact(struct image_params *imgp)
* 0x64 for Linux, 0x86 for *BSD, 0x00 for BSDI.
* NetBSD is in network byte order.. ugh.
*/
if (((a_out->a_magic >> 16) & 0xff) != 0x86 &&
((a_out->a_magic >> 16) & 0xff) != 0 &&
((((int)ntohl(a_out->a_magic)) >> 16) & 0xff) != 0x86)
if (((a_out->a_midmag >> 16) & 0xff) != 0x86 &&
((a_out->a_midmag >> 16) & 0xff) != 0 &&
((((int)ntohl(a_out->a_midmag)) >> 16) & 0xff) != 0x86)
return -1;
/*
@ -184,7 +184,7 @@ exec_aout_imgact(struct image_params *imgp)
* We do two cases: host byte order and network byte order
* (for NetBSD compatibility)
*/
switch ((int)(a_out->a_magic & 0xffff)) {
switch ((int)(a_out->a_midmag & 0xffff)) {
case ZMAGIC:
virtual_offset = 0;
if (a_out->a_text) {
@ -203,7 +203,7 @@ exec_aout_imgact(struct image_params *imgp)
break;
default:
/* NetBSD compatibility */
switch ((int)(ntohl(a_out->a_magic) & 0xffff)) {
switch ((int)(ntohl(a_out->a_midmag) & 0xffff)) {
case ZMAGIC:
case QMAGIC:
virtual_offset = PAGE_SIZE;

View File

@ -161,7 +161,7 @@ do_aout_hdr(struct imgact_gzip * gz)
* Set file/virtual offset based on a.out variant. We do two cases:
* host byte order and network byte order (for NetBSD compatibility)
*/
switch ((int) (gz->a_out.a_magic & 0xffff)) {
switch ((int) (gz->a_out.a_midmag & 0xffff)) {
case ZMAGIC:
gz->virtual_offset = 0;
if (gz->a_out.a_text) {
@ -177,7 +177,7 @@ do_aout_hdr(struct imgact_gzip * gz)
break;
default:
/* NetBSD compatibility */
switch ((int) (ntohl(gz->a_out.a_magic) & 0xffff)) {
switch ((int) (ntohl(gz->a_out.a_midmag) & 0xffff)) {
case ZMAGIC:
case QMAGIC:
gz->virtual_offset = PAGE_SIZE;

View File

@ -119,7 +119,6 @@ struct exec {
uint32_t a_trsize; /* text relocation size */
uint32_t a_drsize; /* data relocation size */
};
#define a_magic a_midmag /* XXX Hack to work with imgact_{aout,gzip}.c */
/* a_magic */
#define OMAGIC 0407 /* old impure format */