Subject: bfd-2.5/netbsd errors ...
To: <>
From: Andrew Cagney <cagney@highland.com.au>
List: tech-ports
Date: 10/18/1994 18:19:13
[Followups to gnu.utils.bug, `tech-ports@netbsd' would already be
aware of the below]


Hello,

I'm merging in my local bfd changes with bfd-2.5 and noticed the
following still lerking in the file `bfd/netbsd.h'


	o	#define N_HEADER_IN_TEXT(x)	1 /* NOT 0 */

		I can't think of a NetBSD binary that doesn't have
		the header in the first page of the text segment.


	o	#define TEXT_START_ADDR         PAGE_SIZE /* NOT 0 */

		Ditto, The entry point being PAGE_SIZE + SIZEOF(header)


	o	N_MAGIC(ex)

		Doesn't need to be defined as the include/a.out one is
		correct.  Further, the conditional:

			(ex).a_info)&0xffff0000) ? ...

		is wrong.  That is a hangover from 386BSD.


	o	#define N_MACHTYPE(exec) \
		((enum machine_type)(((exec).a_info >> 16) & 0x3ff))

		This macro is needed but that conditional isn't.


	o	N_SET_INFO/N_SET_MAGIC/N_SET_MACHTYPE/N_SET_FLAGS

		While N_SET_INFO() uses htonl() to put the magic
		number in NETWORK byte order, the others macro's
		do not.

		I prefer the callbacks (fix_{incomming/outgoing}_header).


If interested in a replacement netbsd.h, let me know.  Comments?


					Andrew