diff options
author | Richard M. Stallman <rms@gnu.org> | 1992-10-27 19:42:55 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1992-10-27 19:42:55 +0000 |
commit | 321c4d21303f7fbdfcd9ffeff1942929d5ef4333 (patch) | |
tree | 006989428b0cb4f28ebab602222f1393a821c9ca /src/unexmips.c | |
parent | 83121e44737e011b696878b017b659bab887de4a (diff) | |
download | emacs-321c4d21303f7fbdfcd9ffeff1942929d5ef4333.tar.gz |
[sony, IRIS_4D]: Include getpagesize.h and fcntl.h.
(unexec): #if 0 the error check of hdr.fhdr.f_nscns.
Clear text_section->s_scnptr.
Diffstat (limited to 'src/unexmips.c')
-rw-r--r-- | src/unexmips.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/unexmips.c b/src/unexmips.c index 32f015f5732..4eeee03f736 100644 --- a/src/unexmips.c +++ b/src/unexmips.c @@ -36,8 +36,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <scnhdr.h> #include <sym.h> -#ifdef IRIS_4D +#if defined (IRIS_4D) || defined (sony) #include "getpagesize.h" +#include <fcntl.h> #endif static void fatal_unexec (); @@ -112,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 */ @@ -163,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); |