Date: Tue, 16 Apr 1996 07:47:21 +0200 From: Karl-Olov Serrander To: spd (J.A. Gutierrez) Subject: Re: Emacs 19.30 + Solaris 2.5 + gcc 2.7.2 + CDE =3D core? Try patch below. Regards --=20 Karl-Olov Serrander kase@celsiustech.se CelsiusTech AB, J=E4rf=E4lla, Sweden Date: Wed, 10 Jan 1996 17:45:15 -0800 From: eggert@twinsun.com (Paul Eggert) To: kase@celsiustech.SE Subject: Re: 19.30 core dump on solaris-2.5 sparc You might try this patch to src/unexelf.c; it worked for me. It's been folded into the GNU development sources. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: unexelf.c,v retrieving revision 19.30 retrieving revision 19.30.1.1 diff -c -r19.30 -r19.30.1.1 *** unexelf.c 1995/05/16 01:44:22 19.30 --- 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)); } =20 + #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 =3D new_file_h->e_shnum - 1; n; n--) + { + Elf32_Shdr section =3D 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 =3D 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 =3D NEW_SECTION_H (nn).sh_addr - + NEW_SECTION_H (nn).sh_offset; + caddr_t reloc =3D old_base + section.sh_offset, end; + for (end =3D reloc + section.sh_size; reloc < end; + reloc +=3D section.sh_entsize) + { + Elf32_Addr addr =3D ((Elf32_Rel *) reloc)->r_offset - offset; + memcpy (new_base + addr, old_base + addr, 4); + } + } + break; + } + } + #endif +=20 #ifdef UNEXEC_USE_MAP_PRIVATE if (lseek (new_file, 0, SEEK_SET) =3D=3D -1) fatal ("Can't rewind (%s): errno %d\n", new_name, errno); --=20 J.A. Gutierrez E. ( finger for PGP, Geek Code and more... ) They call it stormy monday / But Tuesday's just as bad Lord and Wednesday's worse / And Thursday's all so bad (T.Bone Walker)