]> git.eshelyaron.com Git - emacs.git/commitdiff
Delete firstfile.c and lastfile.c
authorStefan Kangas <stefankangas@gmail.com>
Sat, 28 Dec 2024 20:35:07 +0000 (21:35 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 3 Feb 2025 11:08:08 +0000 (12:08 +0100)
With the removal of unexec and purespace, the definitions in these files
are no longer used.  Remove them.

* src/firstfile.c:
* src/lastfile.c: Delete unused files.
* configure.ac (PRE_ALLOC_OBJ, POST_ALLOC_OBJ, FIRSTFILE_OBJ):
Remove variables and dependent code.
* msdos/autogen/Makefile.in:
* msdos/sed1v2.inp:
* src/Makefile.in: Don't use above deleted variables.
* src/deps.mk: Remove lastfile.c dependencies.

(cherry picked from commit c70d595708cd0dc19e85e58148a75df21d80f9b2)

configure.ac
msdos/autogen/Makefile.in
msdos/sed1v2.inp
src/Makefile.in
src/deps.mk
src/firstfile.c [deleted file]
src/lastfile.c [deleted file]

index bd74490baa944132c9cea6982ff1ba0f6820f601..c96e03d63c5955ccfc4439b2972517b3478262ef 100644 (file)
@@ -2998,7 +2998,6 @@ if test "${opsys}" = "mingw32"; then
   HAVE_W32=${emacs_cv_w32api}
 fi
 
-FIRSTFILE_OBJ=
 NTDIR=
 LIBS_ECLIENT=
 LIB_WSOCK32=
@@ -3046,7 +3045,6 @@ if test "${HAVE_W32}" = "yes"; then
     W32_RES_LINK="\$(EMACSRES)"
     CLIENTRES="emacsclient.res"
     CLIENTW="emacsclientw\$(EXEEXT)"
-    FIRSTFILE_OBJ=firstfile.o
     NTDIR=nt
     CM_OBJ=
     LIBS_ECLIENT="-lcomctl32"
@@ -3068,7 +3066,6 @@ AC_SUBST([EMACS_MANIFEST])
 AC_SUBST([CLIENTRES])
 AC_SUBST([CLIENTW])
 AC_SUBST([W32_RES_LINK])
-AC_SUBST([FIRSTFILE_OBJ])
 AC_SUBST([NTDIR])
 AC_SUBST([CM_OBJ])
 AC_SUBST([LIBS_ECLIENT])
@@ -7260,20 +7257,12 @@ AC_SUBST([RALLOC_OBJ])
 
 if test "$opsys" = "cygwin"; then
   CYGWIN_OBJ="cygw32.o"
-  PRE_ALLOC_OBJ=
-  POST_ALLOC_OBJ=lastfile.o
 elif test "$opsys" = "mingw32"; then
   CYGWIN_OBJ=
-  PRE_ALLOC_OBJ=
-  POST_ALLOC_OBJ=lastfile.o
 else
   CYGWIN_OBJ=
-  PRE_ALLOC_OBJ=lastfile.o
-  POST_ALLOC_OBJ=
 fi
 AC_SUBST([CYGWIN_OBJ])
-AC_SUBST([PRE_ALLOC_OBJ])
-AC_SUBST([POST_ALLOC_OBJ])
 
 dnl Call this 'FORTIFY_SOUR' so that it sorts before the 'FORTIFY_SOURCE'
 dnl verbatim defined above.  The tricky name is apropos, as this hack
index 83df237d5654a123e0e7c8edc8f7b8c09843b832..e1c42ad9609bef2034e4b0d9d238017007ff6865 100644 (file)
@@ -456,7 +456,6 @@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
 EXECINFO_H = @EXECINFO_H@
 EXEEXT = @EXEEXT@
-FIRSTFILE_OBJ = @FIRSTFILE_OBJ@
 FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
 FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
 FONT_OBJ = @FONT_OBJ@
@@ -990,10 +989,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PAXCTL = @PAXCTL@
 PKG_CONFIG = @PKG_CONFIG@
-POST_ALLOC_OBJ = @POST_ALLOC_OBJ@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
-PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PROFILING_CFLAGS = @PROFILING_CFLAGS@
index 5fc09cfe84491cf1f5649772754c4d4c63608006..791d6ab269300199e206422e6a261d900140dffa 100644 (file)
@@ -165,10 +165,7 @@ s/ *@WEBP_LIBS@//
 /^XINERAMA_CFLAGS *=/s/@XINERAMA_CFLAGS@//
 /^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/
 /^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/
-/^FIRSTFILE_OBJ *=/s/@FIRSTFILE_OBJ@//
 /^RALLOC_OBJ *=/s/@RALLOC_OBJ@/ralloc.o/
-/^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/
-/^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/
 /^UNEXEC_OBJ *=/s/@UNEXEC_OBJ@/unexcoff.o/
 /^BUILD_DETAILS *=/s/@BUILD_DETAILS@//
 /^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/
index 57300205115c00f73c1c95c5604f8491812feef4..8296329f13630b911f06494d7b3b28f44c4e5e3f 100644 (file)
@@ -447,8 +447,6 @@ ALL_CXX_CFLAGS = $(EMACS_CFLAGS) \
 .cc.o:
        $(AM_V_CXX)$(CXX) -c $(CPPFLAGS) $(ALL_CXX_CFLAGS) $(PROFILING_CFLAGS) $<
 
-## lastfile must follow all files whose initialized data areas should
-## be dumped as pure by dump-emacs.
 base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o     \
        charset.o coding.o category.o ccl.o character.o chartab.o bidi.o       \
        $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ)    \
@@ -497,19 +495,11 @@ VMLIMIT_OBJ=@VMLIMIT_OBJ@
 ## ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty.
 RALLOC_OBJ=@RALLOC_OBJ@
 
-## Empty on Cygwin and MinGW, lastfile.o elsewhere.
-PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@
-## lastfile.o on Cygwin and MinGW, empty elsewhere.
-POST_ALLOC_OBJ=@POST_ALLOC_OBJ@
-
 ## List of object files that make-docfile should not be told about.
-otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
-  $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
+otherobj= $(TERMCAP_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
 
 ## All object files linked into temacs.  $(VMLIMIT_OBJ) should be first.
-## (On MinGW, firstfile.o should be before vm-limit.o.)
-FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
-ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
+ALLOBJS = $(VMLIMIT_OBJ) $(obj) $(otherobj)
 
 # Must be first, before dep inclusion!
 ifneq ($(HAVE_BE_APP),yes)
index 5fa6ed79abe644b41dbdb332b6625af555a4dfaf..e2c786f8fb0b451dca8133f0956e4064c382ed76 100644 (file)
@@ -137,7 +137,6 @@ keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \
 keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
    atimer.h systime.h character.h charset.h $(INTERVALS_H) \
    keymap.h window.h coding.h frame.h lisp.h globals.h $(config_h)
-lastfile.o: lastfile.c $(config_h)
 macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h msdos.h \
    dispextern.h lisp.h globals.h $(config_h) systime.h coding.h composite.h
 gmalloc.o: gmalloc.c $(config_h)
diff --git a/src/firstfile.c b/src/firstfile.c
deleted file mode 100644 (file)
index 1cd190a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Mark beginning of data space to dump as pure, for GNU Emacs.
-   Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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 3 of the License, or (at
-your option) any later version.
-
-GNU Emacs 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 GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
-
-
-#include <config.h>
-
-#ifdef WINDOWSNT
-/* See comments in lastfile.c.  */
-char my_begdata[] = "Beginning of Emacs initialized data";
-char my_begbss[1];  /* Do not initialize this variable.  */
-static char _my_begbss[1];
-char * my_begbss_static = _my_begbss;
-
-/* Add a dummy reference to ensure emacs.o is linked in.  */
-extern int main (int, char **);
-int (*dummy_main_reference) (int, char **) = main;
-#endif
diff --git a/src/lastfile.c b/src/lastfile.c
deleted file mode 100644 (file)
index 509c54d..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Mark end of data space to dump as pure, for GNU Emacs.
-   Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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 3 of the License, or (at
-your option) any later version.
-
-GNU Emacs 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 GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
-
-
-/* How this works:
-
- Fdump_emacs dumps everything up to my_edata as text space (pure).
-
- The files of Emacs are written so as to have no initialized
- data that can ever need to be altered except at the first startup.
- This is so that those words can be dumped as shareable text.
-
- It is not possible to exercise such control over library files.
- So it is necessary to refrain from making their data areas shared.
- Therefore, this file is loaded following all the files of Emacs
- but before library files.
- As a result, the symbol my_edata indicates the point
- in data space between data coming from Emacs and data
- coming from libraries.
-*/
-
-#include <config.h>
-
-#include "lisp.h"
-
-#if (!defined SYSTEM_MALLOC \
-     || defined WINDOWSNT || defined CYGWIN || defined DARWIN_OS)
-char my_edata[] = "End of Emacs initialized data";
-#endif