X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/248a26a710ec6401e6eddaccd8446665a261ef5e..abfc2e5fd21a2f8430fff7af6b9481a0a9a8a0db:/src/unexmips.c diff --git a/src/unexmips.c b/src/unexmips.c index 76de824d06..292f0210c5 100644 --- a/src/unexmips.c +++ b/src/unexmips.c @@ -36,11 +36,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include -#ifdef IRIS_4D +#if defined (IRIS_4D) || defined (sony) #include "getpagesize.h" +#include #endif static void fatal_unexec (); +static void mark_x (); #define READ(_fd, _buffer, _size, _error_message, _error_arg) \ errno = EEOF; \ @@ -111,11 +113,11 @@ unexec (new_name, a_name, data_start, bss_start, entry_address) && hdr.fhdr.f_magic != (MIPSELMAGIC | 1) && hdr.fhdr.f_magic != (MIPSEBMAGIC | 1)) { - fprintf(stderr, - "unexec: input file magic number is %x, not %x, %x, %x or %x.\n", - hdr.fhdr.f_magic, - MIPSELMAGIC, MIPSEBMAGIC, - MIPSELMAGIC | 1, MIPSEBMAGIC | 1); + fprintf (stderr, + "unexec: input file magic number is %x, not %x, %x, %x or %x.\n", + hdr.fhdr.f_magic, + MIPSELMAGIC, MIPSEBMAGIC, + MIPSELMAGIC | 1, MIPSEBMAGIC | 1); exit(1); } #else /* not MIPS2 */ @@ -162,9 +164,14 @@ unexec (new_name, a_name, data_start, bss_start, entry_address) CHECK_SCNHDR (sdata_section, _SDATA, STYP_SDATA); CHECK_SCNHDR (sbss_section, _SBSS, STYP_SBSS); CHECK_SCNHDR (bss_section, _BSS, STYP_BSS); +#if 0 /* Apparently this error check goes off on irix 3.3, + but it doesn't indicate a real problem. */ if (i != hdr.fhdr.f_nscns) fprintf (stderr, "unexec: %d sections found instead of %d.\n", i, hdr.fhdr.f_nscns); +#endif + + text_section->s_scnptr = 0; pagesize = getpagesize (); brk = (sbrk (0) + pagesize - 1) & (-pagesize); @@ -274,10 +281,10 @@ unexec (new_name, a_name, data_start, bss_start, entry_address) /* * mark_x * - * After succesfully building the new a.out, mark it executable + * After successfully building the new a.out, mark it executable */ -static +static void mark_x (name) char *name; {