Article View: fj.editor.mule
Article #3120Re: Segmentation Fault on Solaris2.5
From: Susumu Oikawa
Date: Tue, 09 Apr 1996 00:00
Date: Tue, 09 Apr 1996 00:00
98 lines
4214 bytes
4214 bytes
>>>>> "kose" == KOSEKI Yoshinori <kose@tamra.co.jp> writes:
Jake> Fatal error (11).Segmentation Fault (core dumped)
kose> $B;d$N$H$3$m$O!"F|K\8l(BSolaris2.5 HW:1/96 $B$J$N$G$9$,!"F1$8$h$&(B
kose> $B$J8=>]$G$7$?!#(B(CDE$B$K$7$F$$$^$9$,!#(B)
>> kterm $B$NCf$G(B mule2 -nw $B$H$9$k$HBg>fIW$J$N$G(B X11 $B4X78$N%H%i%V%k(B
>> $B$@$H;W$$$^$9$,$I$&$9$l$P$$$$$s$G$7$g$&$+!#(B
kose> --with-x-toolkit$B$rIU$1$J$$$G%3%s%Q%$%k$7$?$i!"(BOK$B$G$7$?$h!#(B
kose> $B860xEy$O>\$7$$$+$?$K$*4j$$$7$^$9!#(B
--with-x-toolkit $B$r30$7$F(B configure $B$7$?$b$N$OF0$-$^$7$?$,!"(BXt $B$rD|$a(B
$B$-$l$J$$$N$G(B ^^; emacs-19.30 $B$r;}$C$F$-$F(B make $B$7$F$_$?$j$7$F$$$?$N$G(B
$B$9$,(B mule-2.3@19.30 $B$r(B Solaris2.5 $B$G;H$C$F$$$k!V>\$7$$J}!W$+$i(B
mule-2.3@19.30 $B$K(B comp.unix.solaris $B$GN.$l$?%Q%C%A$rEv$F$k$H(B Xt $B$r;H$C(B
$B$F$bF0$/$h!"$H65$($FD:$-$^$7$?!#(B
$B$=$l$r85$K0J2<$NJ}K!$GIaDL$N(B mule-2.3 $B!J(Bemacs-19.28 $B%Y!<%9!K$r(B
Solaris2.5 $B$G(B Xt $BIU$-$GF0$+$9$3$H$K@.8y$7$^$7$?!#(B
1. gettimeofday $B$N0z?t$NLdBj$N2r7h(B
$B$3$l$O4JC1$G$9!#(Bsrc/s/sol2-4.h $B$G(B #include "sol2-3.h" $B$N<!$N9T$K(B
#undef GETTIMEOFDAY_ONE_ARGUMENT
$B$rF~$l$F$*$1$P#O#K$G$9!#(B
2. $B%3%"%@%s%W$9$kLdBj$N2r7h(B
src/unexelf.c $B$r(B emacs-19.29 $B$+(B 19.30 $B$N(B src/unexelf.c $B$HF~$lBX$($F!"(B
Message-ID: <4d4heq$nn@der.twinsun.com>
$B$N%Q%C%A$r$"$F$^$9!#%Q%C%A$O0J2<$N$h$&$J$b$N$G$9!#(B
===================================================================
RCS file: src/unexelf.c,v
retrieving revision 19.30
retrieving revision 19.30.1.1
diff -c -r19.30 -r19.30.1.1
*** src/unexelf.c 1995/05/16 01:44:22 19.30
--- src/unexelf.c 1996/01/11 01:16:45 19.30.1.1
***************
*** 807,812 ****
--- 807,846 ----
memcpy (&symp->st_value, &new_bss_addr, sizeof (new_bss_addr));
}
+ #ifdef SOLARIS2
+ /* This loop seeks out relocation sections for the data section, so
+ that it can undo relocations performed by the runtime linker. */
+ for (n = new_file_h->e_shnum - 1; n; n--)
+ {
+ Elf32_Shdr section = NEW_SECTION_H (n);
+ switch (section.sh_type) {
+ default:
+ break;
+ case SHT_REL:
+ case SHT_RELA:
+ /* This code handles two different size structs, but there
+ should be no harm in that provided that r_offset is always
+ the first member. */
+ nn = section.sh_info;
+ if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data")
+ || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
+ ".data1"))
+ {
+ Elf32_Addr offset = NEW_SECTION_H (nn).sh_addr -
+ NEW_SECTION_H (nn).sh_offset;
+ caddr_t reloc = old_base + section.sh_offset, end;
+ for (end = reloc + section.sh_size; reloc < end;
+ reloc += section.sh_entsize)
+ {
+ Elf32_Addr addr = ((Elf32_Rel *) reloc)->r_offset - offset;
+ memcpy (new_base + addr, old_base + addr, 4);
+ }
+ }
+ break;
+ }
+ }
+ #endif
+
#ifdef UNEXEC_USE_MAP_PRIVATE
if (lseek (new_file, 0, SEEK_SET) == -1)
fatal ("Can't rewind (%s): errno %d\n", new_name, errno);
===================================================================
$B$"$H$O%3%s%U%#%0%l!<%7%g%s$r(B sparc-sun-solaris2.4 $B$K$9$l$P(B
--with-x-toolkit $B$rIU$1$F(B configure $B$7$F$b$&$^$/(B make $B$G$-!"@5>o$KN)$A(B
$B>e$,$C$F$$$^$9!#(B
--
$B5Z@n(B $B?8(B <oikawa@saccd.semicon.sony.co.jp> SUBARU IMPREZA (555
... Too many ('s.
Technical Details
Message-ID:
<OIKAWA.96Apr9151102@qubeley.saccd.semicon.sony.co.jp>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<315A3CB9.1121@nuri.net> <OIKAWA.96Apr8225318@auge.saccd.semicon.sony.co.jp>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 10eba4,70476934cc8457c6 X-Google-Attributes: gid10eba4,public From: oikawa@saccd.semicon.sony.co.jp (Susumu Oikawa) Subject: Re: Segmentation Fault on Solaris2.5 Date: 1996/04/09 Message-ID: <OIKAWA.96Apr9151102@qubeley.saccd.semicon.sony.co.jp> X-Deja-AN: 146502947 distribution: fj references: <315A3CB9.1121@nuri.net> <OIKAWA.96Apr8225318@auge.saccd.semicon.sony.co.jp> organization: Semiconductor Company, SONY, Atsugi, JAPAN newsgroups: fj.editor.mule