From 261e267ac24ba4d033f02e9a89d4236a5635c734 Mon Sep 17 00:00:00 2001 From: John Polstra Date: Fri, 10 Apr 1998 01:20:40 +0000 Subject: Fix the assembler so that it produces object files with the correct magic number byte ordering for FreeBSD. This makes "file" describe our object files as "FreeBSD/i386 object" instead of as NetBSD object files. In case this seems drastic and risky, Bruce points out that the "ld -r -x" step that is done on every object file when building libraries fixes the byte ordering in the same way. I have been running with this patch for over a month and have seen no problems. --- gnu/usr.bin/as/config/obj-aout.c | 2 +- gnu/usr.bin/as/config/obj-aout.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/usr.bin/as/config/obj-aout.c b/gnu/usr.bin/as/config/obj-aout.c index 860d90461b75..9435d0789fa8 100644 --- a/gnu/usr.bin/as/config/obj-aout.c +++ b/gnu/usr.bin/as/config/obj-aout.c @@ -142,7 +142,7 @@ object_headers *headers; { tc_headers_hook(headers); -#if defined(FREEBSD_AOUT) || defined(NETBSD_AOUT) +#if defined(NETBSD_AOUT) /* `a_info' (magic, mid, flags) is in network byte-order */ (*where)[0] = ((char *)&headers->header.a_info)[0]; (*where)[1] = ((char *)&headers->header.a_info)[1]; diff --git a/gnu/usr.bin/as/config/obj-aout.h b/gnu/usr.bin/as/config/obj-aout.h index 05ad5b3201a4..cca03f6e5896 100644 --- a/gnu/usr.bin/as/config/obj-aout.h +++ b/gnu/usr.bin/as/config/obj-aout.h @@ -17,7 +17,7 @@ License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ + $Id: obj-aout.h,v 1.7 1997/02/22 15:44:22 peter Exp $ */ @@ -168,7 +168,7 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */ #define H_SET_INFO(h,mag,mid,f,v) \ ( (h)->header.a_info = \ - htonl( (((f)&0x3f)<<26) | (((mid)&0x03ff)<<16) | (((mag)&0xffff)) ) ) + (((f)&0x3f)<<26) | (((mid)&0x03ff)<<16) | (((mag)&0xffff)) ) #endif /* FREEBSD_AOUT */ -- cgit v1.3