Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!usc!bloom-beacon!eru!luth!sunic!mcsun!tuvie!inst182
From: inst182@tuvie (Inst.f.Techn.Informatik)
Newsgroups: gnu.emacs
Subject: Re: Can't bring up emacs on a DECstation 3100
Summary: Solution (?) found, includes patch.
Message-ID: <732@tuvie>
Date: 3 Oct 89 15:28:32 GMT
References: <342@massey.ac.nz>
Reply-To: alex@honey.at
Organization: TU Vienna EDP-Center, Vienna, AUSTRIA
Lines: 75

In article <342@massey.ac.nz>, KSpagnol@massey.ac.nz (Ken Spagnolo) writes:
> We have a few of those fancy new DECstation 3100 RISC machines running
> Ultrix 3.0.  Below is part of the output when making version 18.51
    [some lines deleted]
> Dumping under names xemacs and emacs-18.51.15
> unexec: 7 sections instead of 6.
> unexec: .lit8 section where .sdata expected.
> *** Error code 1

Well, I experienced the same problem. 
(Emacs version 18.50, part of the `leif' incremental parser 
distribution from uiuc).
After looking at the a.out header of temacs I decided to hack 
the unexec.c-file to cater for the lit8-section. 
After that everything worked fine. That means: xemacs
was dumped without complaint and I was able to run it. I have
not tested it thoroughly, because I don't know much about emacs.
But: It ran until I found someone who told me how to get out! :-)

I thought I might post the diffs. If anyone who *really* knows
what goes on here would like to comment, please do so.

You know, this *must* be the most unofficial patch ever ;-)
No guarantees that this will work, no guarantees it will not do harm etc.

Replies, comments, explanations: See the address *below*.

-alex
Alexander Vrchoticky, TU Vienna.
alex@vmars.at  vmars!alex@uunet.UU.NET

--cut here-- --cut here-- --cut here-- --cut here-- --cut here-- --cut here--

*** unexec.c-dist	Tue Oct  3 14:38:01 1989
--- unexec.c	Tue Oct  3 16:05:44 1989
***************
*** 958,963 ****
--- 958,964 ----
      struct scnhdr text_section;
      struct scnhdr rdata_section;
      struct scnhdr data_section;
+     struct scnhdr lit8_section;
      struct scnhdr sdata_section;
      struct scnhdr sbss_section;
      struct scnhdr bss_section;
***************
*** 1014,1021 ****
        exit(1);
    }
  #endif
!   if (hdr.fhdr.f_nscns != 6) {
!       fprintf(stderr, "unexec: %d sections instead of 6.\n", hdr.fhdr.f_nscns);
    }
  #define CHECK_SCNHDR(field, name, flags) \
    if (strcmp(hdr.field.s_name, name) != 0) { \
--- 1015,1022 ----
        exit(1);
    }
  #endif
!   if (hdr.fhdr.f_nscns != 7) {
!       fprintf(stderr, "unexec: %d sections instead of 7.\n", hdr.fhdr.f_nscns);
    }
  #define CHECK_SCNHDR(field, name, flags) \
    if (strcmp(hdr.field.s_name, name) != 0) { \
***************
*** 1030,1035 ****
--- 1031,1037 ----
    CHECK_SCNHDR(text_section,  _TEXT,  STYP_TEXT);
    CHECK_SCNHDR(rdata_section, _RDATA, STYP_RDATA);
    CHECK_SCNHDR(data_section,  _DATA,  STYP_DATA);
+   CHECK_SCNHDR(lit8_section,  _LIT8,  STYP_LIT8);
    CHECK_SCNHDR(sdata_section, _SDATA, STYP_SDATA);
    CHECK_SCNHDR(sbss_section,  _SBSS,  STYP_SBSS);
    CHECK_SCNHDR(bss_section,   _BSS,   STYP_BSS);
--cut here-- --cut here-- --cut here-- --cut here-- --cut here-- --cut here--