[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unexelf.c failure on IRIX

From: David Kaelbling
Subject: Re: unexelf.c failure on IRIX
Date: Mon, 26 Nov 2001 10:33:22 -0500

Sorry for the slow response -- a combination of Thanksgiving and VPN

The humungous $CC is essentially just a script to ensure that
/usr/freeware gets searched before the default paths, since that's where
we put things like png and the latest xpm.

I've pasted my replies in below.

Eli Zaretskii wrote:
> Could you please send the configuration summary that the configure
> script prints before it exist?  

Configured for `mips-sgi-irix6.5'.

  Where should the build process find the source code?   
  What operating system and machine description files should Emacs use?
        `s/irix6-5.h' and `m/iris4d.h'
  What compiler should emacs be built with?               sgifwcompile
-e -q -nostdinc -I.
-I/toolroots/freeware/working/proot/usr/include -O3
-OPT:Olimit=0:space=ON -DEBUG:optimize_space=on  -TENV:X=1
-OPT:IEEE_arithmetic=1:roundoff=0:wrap_around_unsafe_opt=off -n32 -mips3
-nostdlib -L/toolroots/freeware/working/proot/usr/freeware/lib32 
-L/toolroots/freeware/working/proot/usr/lib32 -woff
-Wl,-woff,85,-woff,84 -rpath /usr/freeware/lib32 --
/toolroots/freeware/working/ptoolroot/usr/bin/cc -D_LANGUAGE_C -g3 -O
  Should Emacs use the GNU version of malloc?             yes
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         yes
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          MOTIF
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use -lungif?                                 yes
  Does Emacs use -lpng?                                   yes
  Does Emacs use X toolkit scroll bars?                   yes

Note that I got similar crashes using Xaw3d and LUCID.

> I wonder what is different in your case, since I don't have the
> problems you describe.
> > Some trial and error showed that the
> > following patch let it work again:
> >
> > --- ./src/unexelf.c   Tue Sep 26 09:01:57 2000
> > +++ ../emacs-21.1/./src/unexelf.c     Tue Nov 20 14:23:39 2001
> > @@ -994,6 +994,10 @@
> >                     ".lit4")
> >         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
> >                     ".lit8")
> > +#if __sgi
> > +       || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
> > +                   ".got")
> > +#endif
> >         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
> >                     ".sdata1")
> >         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
> > @@ -1172,6 +1176,10 @@
> >                       ".lit4")
> >           || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
> >                       ".lit8")
> > +#if __sgi
> > +         || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
> > +                     ".got")
> > +#endif
> >           || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
> >                       ".sdata1")
> >           || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
> Any idea where did those sections come from?  Are you using some
> special compiler or linker?  (I used the native Irix tools.)

I'm using the stock MipsPRO v7.3.1.3 compilers.  

A global offset table section is standard on IRIX.  My understanding
(I'm not a compiler guru) is that position independent code references
globals indirectly through the .got table.  That way when code is
relocated only the .got needs to be updated. 
http://techpubs.sgi.com/library/tpl/cgi-bin/search.cgi gives some
references, but "man dso" is a good place to start.

The patch I sent in isn't derived from any deep insight on my part: if
you look through unexlf.c there are some comments talking about how to
handle .got.  Since previous versions of emacs worked I looked at what
xemacs did, and decided these lines had gotten lost somewhere.

I hope that helps!


David KAELBLING <address@hidden>            Silicon Graphics Computer Systems
1 Cabot Rd, suite 250; Hudson, MA 01749     781.839.2157, fax ...2357

reply via email to

[Prev in Thread] Current Thread [Next in Thread]