Commits

cvs  committed 3ecd888

Import from CVS: tag r21-2-22

  • Participants
  • Parent commits 0a0253e
  • Tags r21-2-22

Comments (0)

Files changed (1481)

File CHANGES-beta

 							-*- indented-text -*-
-to 21.2.21 "Euterpe"
+to 21.2.22 "Mercedes"
 -- ESD Sound support from Robert Bihlmeyer
 -- 10% faster redisplay from Jan Vroonhof
 -- Fixes from Jeff Miller, Alexandre Oliva and Yoshiki Hayashi
+1999-11-29  XEmacs Build Bot <builds@cvs.xemacs.org>
+
+	* XEmacs 21.2.22 is released
+
 1999-11-28  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.21 is released.

File dynodump/Makefile.in.in

+##   Makefile for dynodump subdirectory in XEmacs
+##   Copyright (C) 1995 Board of Trustees, University of Illinois
+##   Copyright (C) 1996, 1997 Sun Microsystems, Inc.
+
+## This file is part of XEmacs.
+
+## XEmacs is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by the
+## Free Software Foundation; either version 2, or (at your option) any
+## later version.
+
+## XEmacs is distributed in the hope that it will be useful, but WITHOUT
+## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with XEmacs; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+## Boston, MA 02111-1307, USA.
+
+## Synched up with: Not synched with FSF.
+
+## For performance and consistency, no built-in rules.
+.SUFFIXES:
+.SUFFIXES: .c .o .i .h
+
+@SET_MAKE@
+SHELL = /bin/sh
+RM = rm -f
+
+## ==================== Things "configure" will edit ====================
+
+CC=@CC@
+CFLAGS=@CFLAGS@
+ARCH=@dynodump_arch@
+
+srcdir=@srcdir@
+
+## ========================= start of cpp stuff =========================
+
+#define NO_SHORTNAMES
+#define NOT_C_CODE
+#include "../src/config.h"
+
+#ifdef USE_GNU_MAKE
+vpath %.c @srcdir@
+vpath %.h @srcdir@
+#else
+VPATH=@srcdir@
+#endif
+
+#ifdef USE_GCC
+pic_arg = -fpic
+#else
+pic_arg = -K pic
+#endif
+
+INCLUDES = -I${srcdir} -I${srcdir}/$(ARCH)
+ALL_CFLAGS = ${CFLAGS} ${pic_arg} ${INCLUDES}
+OBJS = _relocate.o dynodump.o syms.o uninit.o
+
+%.o : %.c
+	$(CC) -c $(ALL_CFLAGS) $<
+
+all:: dynodump.so
+
+dynodump.so: ${srcdir}/_dynodump.h $(OBJS)
+	PATH=/usr/ccs/bin:/bin:$$PATH ld -o dynodump.so -G $(OBJS) -lelf -lmapmalloc
+
+_relocate.o: ${srcdir}/$(ARCH)/_relocate.c
+	$(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/_relocate.c
+
+uninit.o: ${srcdir}/$(ARCH)/uninit.c
+	$(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/uninit.c
+
+.PHONY: mostlyclean clean distclean realclean extraclean
+mostlyclean:
+	$(RM) *.o *.i core
+clean: mostlyclean
+	$(RM) *.so *.so.1
+distclean: clean
+	$(RM) GNUmakefile Makefile Makefile.in TAGS
+realclean: distclean
+extraclean: realclean
+	$(RM) *~ \#*

File dynodump/README

+		DYNODUMP
+		--------
+
+Dynodump, not to be confused with DinoTurd (as seen in Jurassic Park),
+is a shared object that provides one function:
+
+	int dynodump(char *new_file);
+
+dynodump(), called from a running program will write a new executable
+in new_file a la unexec() in GNU Emacs.  The difference lies in the
+relocations.
+
+dynodump() will create an image with any relocations (which were
+performed by the run-time dynamic linker) undone.  This allows the new
+image to be run in a different environment.  There is, however, one
+potentially major caveat.  If a symbol reference gets updated during
+the running of the calling program, its updated value will be lost.
+An example (with additional blank lines for legibility):
+
+	$ cat lib.c
+	char _foo[] = "hello";
+	char _bar[] = "world";
+
+	$ cc -G -o lib.so lib.c
+
+	$ cat prog.c
+	extern char _foo, _bar;
+ 
+	int beenhere = 0;
+	char * foo = &_foo;
+	char * bar = &_bar;
+ 
+	int
+	main(void)
+	{
+	    (void) printf("%d: foo = %x\n", beenhere, foo);
+	    (void) printf("%d: bar = %x, ", beenhere, bar);
+ 
+	    if (!beenhere) {
+	        beenhere = 1;
+	        bar++;
+	        dynodump("newfile");
+	    }
+	    (void) printf("%x\n", bar);
+	}
+
+	$ cc -o prog prog.c -R. lib.so dynodump.so
+
+	$ ./prog
+	0: foo = ef7503cc
+	0: bar = ef7503d2, ef7503d3
+
+	$ ./newfile
+	1: foo = ef7503cc
+	1: bar = ef7503d2, ef7503d2
+
+Notice that in the run of newfile, bar points at "world" instead of
+the perhaps expected "orld".
+
+Dynodump supports sparc, intel, and power pc architectures.
+
+Dynodump is buildable with GNU make and gcc.  If it works for you
+with these tools, let me know.
+
+unexec()
+--------
+
+Also supplied is an unexsol2.c which belongs in the XEmacs src
+directory with the other unex*.c files.  The src/s/sol2.h should be
+have the following added to it:
+
+	#ifdef UNEXEC
+	#undef UNEXEC
+	#endif
+	#define UNEXEC unexsol2.o
+
+This unexec() will attempt to dlopen() the dynodump.so to find the
+dynodump function.  The default is "../dynodump/dynodump.so" which
+should be appropriate for the typical XEmacs build (unless you used
+configure to set up separate build and source trees).  You may change
+it by setting the DYNODUMP environment variable to the full path of
+the dynodump shared object.
+
+Other notes:
+
+If you're using the 4.0 C compiler from Sun, you should arrange to
+shut off the incremental linker.  This is done with the -xildoff
+option to the compiler.  The common.mk and testsuite/Makefile files
+have commentary and ready made lines for uncommenting for this
+purpose.
+
+If you're interested in playing with the UltraSPARC specific options
+to the aforementioned compiler, then the same makefiles have some
+commentary and flags settings to point you in that direction.
+
+Questions:
+
+dynodump() was developed by Rod.Evans@Eng.Sun.COM and
+Georg.Nikodym@Canada.Sun.COM.  If you have questions, feel free to ask
+them but be aware that Rod, "don't know jack about emacs."
+

File dynodump/_dynodump.h

+/*
+ *	Copyright (c) 1995 by Sun Microsystems, Inc.
+ *	All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+#pragma ident	"@(#) $Id: _dynodump.h,v 1.3 1997/05/29 04:22:29 steve Exp $ - SMI"
+
+#ifndef	_DYNODUMP_DOT_H
+#define	_DYNODUMP_DOT_H
+
+#include	<libelf.h>
+#include	"machdep.h"
+
+/* General rounding macro */
+#define	S_ROUND(x, a)   (((int)(x) + (((int)(a) ? (int)(a) : 1) - 1)) & \
+			 ~(((int)(a) ? (int)(a) : 1) - 1))
+
+/*
+ * Define a cache structure that is used to retain all elf section information.
+ */
+typedef struct cache {
+    Elf_Scn *c_scn;
+    Shdr *c_shdr;
+    Elf_Data *c_data;
+    char *c_name;
+} Cache;
+
+/*
+ * Define any local prototypes.
+ */