aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2024-12-28 21:35:07 +0100
committerStefan Kangas2024-12-28 21:35:07 +0100
commitc70d595708cd0dc19e85e58148a75df21d80f9b2 (patch)
tree9ea02c4ecc00d789e66c294730986552ea7ac0f7
parent305bd550cf28045505e76c2b23f51860da914310 (diff)
downloademacs-c70d595708cd0dc19e85e58148a75df21d80f9b2.tar.gz
emacs-c70d595708cd0dc19e85e58148a75df21d80f9b2.zip
Delete firstfile.c and lastfile.c
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.
-rw-r--r--configure.ac11
-rw-r--r--msdos/autogen/Makefile.in3
-rw-r--r--msdos/sed1v2.inp3
-rw-r--r--src/Makefile.in14
-rw-r--r--src/deps.mk1
-rw-r--r--src/firstfile.c32
-rw-r--r--src/lastfile.c44
7 files changed, 2 insertions, 106 deletions
diff --git a/configure.ac b/configure.ac
index 86e2e0a9f78..422ca92dca9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2998,7 +2998,6 @@ if test "${opsys}" = "mingw32"; then
2998 HAVE_W32=${emacs_cv_w32api} 2998 HAVE_W32=${emacs_cv_w32api}
2999fi 2999fi
3000 3000
3001FIRSTFILE_OBJ=
3002NTDIR= 3001NTDIR=
3003LIBS_ECLIENT= 3002LIBS_ECLIENT=
3004LIB_WSOCK32= 3003LIB_WSOCK32=
@@ -3046,7 +3045,6 @@ if test "${HAVE_W32}" = "yes"; then
3046 W32_RES_LINK="\$(EMACSRES)" 3045 W32_RES_LINK="\$(EMACSRES)"
3047 CLIENTRES="emacsclient.res" 3046 CLIENTRES="emacsclient.res"
3048 CLIENTW="emacsclientw\$(EXEEXT)" 3047 CLIENTW="emacsclientw\$(EXEEXT)"
3049 FIRSTFILE_OBJ=firstfile.o
3050 NTDIR=nt 3048 NTDIR=nt
3051 CM_OBJ= 3049 CM_OBJ=
3052 LIBS_ECLIENT="-lcomctl32" 3050 LIBS_ECLIENT="-lcomctl32"
@@ -3068,7 +3066,6 @@ AC_SUBST([EMACS_MANIFEST])
3068AC_SUBST([CLIENTRES]) 3066AC_SUBST([CLIENTRES])
3069AC_SUBST([CLIENTW]) 3067AC_SUBST([CLIENTW])
3070AC_SUBST([W32_RES_LINK]) 3068AC_SUBST([W32_RES_LINK])
3071AC_SUBST([FIRSTFILE_OBJ])
3072AC_SUBST([NTDIR]) 3069AC_SUBST([NTDIR])
3073AC_SUBST([CM_OBJ]) 3070AC_SUBST([CM_OBJ])
3074AC_SUBST([LIBS_ECLIENT]) 3071AC_SUBST([LIBS_ECLIENT])
@@ -7206,20 +7203,12 @@ AC_SUBST([RALLOC_OBJ])
7206 7203
7207if test "$opsys" = "cygwin"; then 7204if test "$opsys" = "cygwin"; then
7208 CYGWIN_OBJ="cygw32.o" 7205 CYGWIN_OBJ="cygw32.o"
7209 PRE_ALLOC_OBJ=
7210 POST_ALLOC_OBJ=lastfile.o
7211elif test "$opsys" = "mingw32"; then 7206elif test "$opsys" = "mingw32"; then
7212 CYGWIN_OBJ= 7207 CYGWIN_OBJ=
7213 PRE_ALLOC_OBJ=
7214 POST_ALLOC_OBJ=lastfile.o
7215else 7208else
7216 CYGWIN_OBJ= 7209 CYGWIN_OBJ=
7217 PRE_ALLOC_OBJ=lastfile.o
7218 POST_ALLOC_OBJ=
7219fi 7210fi
7220AC_SUBST([CYGWIN_OBJ]) 7211AC_SUBST([CYGWIN_OBJ])
7221AC_SUBST([PRE_ALLOC_OBJ])
7222AC_SUBST([POST_ALLOC_OBJ])
7223 7212
7224dnl Call this 'FORTIFY_SOUR' so that it sorts before the 'FORTIFY_SOURCE' 7213dnl Call this 'FORTIFY_SOUR' so that it sorts before the 'FORTIFY_SOURCE'
7225dnl verbatim defined above. The tricky name is apropos, as this hack 7214dnl verbatim defined above. The tricky name is apropos, as this hack
diff --git a/msdos/autogen/Makefile.in b/msdos/autogen/Makefile.in
index 4225cc72bcc..f67dfc1ba03 100644
--- a/msdos/autogen/Makefile.in
+++ b/msdos/autogen/Makefile.in
@@ -456,7 +456,6 @@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
456ERRNO_H = @ERRNO_H@ 456ERRNO_H = @ERRNO_H@
457EXECINFO_H = @EXECINFO_H@ 457EXECINFO_H = @EXECINFO_H@
458EXEEXT = @EXEEXT@ 458EXEEXT = @EXEEXT@
459FIRSTFILE_OBJ = @FIRSTFILE_OBJ@
460FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ 459FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
461FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ 460FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
462FONT_OBJ = @FONT_OBJ@ 461FONT_OBJ = @FONT_OBJ@
@@ -990,10 +989,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
990PATH_SEPARATOR = @PATH_SEPARATOR@ 989PATH_SEPARATOR = @PATH_SEPARATOR@
991PAXCTL = @PAXCTL@ 990PAXCTL = @PAXCTL@
992PKG_CONFIG = @PKG_CONFIG@ 991PKG_CONFIG = @PKG_CONFIG@
993POST_ALLOC_OBJ = @POST_ALLOC_OBJ@
994PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ 992PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
995PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ 993PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
996PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@
997PRIPTR_PREFIX = @PRIPTR_PREFIX@ 994PRIPTR_PREFIX = @PRIPTR_PREFIX@
998PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ 995PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
999PROFILING_CFLAGS = @PROFILING_CFLAGS@ 996PROFILING_CFLAGS = @PROFILING_CFLAGS@
diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp
index a84cee32927..e344058ea08 100644
--- a/msdos/sed1v2.inp
+++ b/msdos/sed1v2.inp
@@ -165,10 +165,7 @@ s/ *@WEBP_LIBS@//
165/^XINERAMA_CFLAGS *=/s/@XINERAMA_CFLAGS@// 165/^XINERAMA_CFLAGS *=/s/@XINERAMA_CFLAGS@//
166/^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/ 166/^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/
167/^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/ 167/^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/
168/^FIRSTFILE_OBJ *=/s/@FIRSTFILE_OBJ@//
169/^RALLOC_OBJ *=/s/@RALLOC_OBJ@/ralloc.o/ 168/^RALLOC_OBJ *=/s/@RALLOC_OBJ@/ralloc.o/
170/^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/
171/^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/
172/^UNEXEC_OBJ *=/s/@UNEXEC_OBJ@/unexcoff.o/ 169/^UNEXEC_OBJ *=/s/@UNEXEC_OBJ@/unexcoff.o/
173/^BUILD_DETAILS *=/s/@BUILD_DETAILS@// 170/^BUILD_DETAILS *=/s/@BUILD_DETAILS@//
174/^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/ 171/^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/
diff --git a/src/Makefile.in b/src/Makefile.in
index 51352dd6d74..ce7d7bb36f3 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -446,8 +446,6 @@ ALL_CXX_CFLAGS = $(EMACS_CFLAGS) \
446.cc.o: 446.cc.o:
447 $(AM_V_CXX)$(CXX) -c $(CPPFLAGS) $(ALL_CXX_CFLAGS) $(PROFILING_CFLAGS) $< 447 $(AM_V_CXX)$(CXX) -c $(CPPFLAGS) $(ALL_CXX_CFLAGS) $(PROFILING_CFLAGS) $<
448 448
449## lastfile must follow all files whose initialized data areas should
450## be dumped as pure by dump-emacs.
451base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ 449base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
452 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \ 450 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \
453 $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ 451 $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
@@ -496,19 +494,11 @@ VMLIMIT_OBJ=@VMLIMIT_OBJ@
496## ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty. 494## ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty.
497RALLOC_OBJ=@RALLOC_OBJ@ 495RALLOC_OBJ=@RALLOC_OBJ@
498 496
499## Empty on Cygwin and MinGW, lastfile.o elsewhere.
500PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@
501## lastfile.o on Cygwin and MinGW, empty elsewhere.
502POST_ALLOC_OBJ=@POST_ALLOC_OBJ@
503
504## List of object files that make-docfile should not be told about. 497## List of object files that make-docfile should not be told about.
505otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ 498otherobj= $(TERMCAP_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
506 $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
507 499
508## All object files linked into temacs. $(VMLIMIT_OBJ) should be first. 500## All object files linked into temacs. $(VMLIMIT_OBJ) should be first.
509## (On MinGW, firstfile.o should be before vm-limit.o.) 501ALLOBJS = $(VMLIMIT_OBJ) $(obj) $(otherobj)
510FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
511ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
512 502
513# Must be first, before dep inclusion! 503# Must be first, before dep inclusion!
514ifneq ($(HAVE_BE_APP),yes) 504ifneq ($(HAVE_BE_APP),yes)
diff --git a/src/deps.mk b/src/deps.mk
index 0ba43a014f8..80937e26b10 100644
--- a/src/deps.mk
+++ b/src/deps.mk
@@ -137,7 +137,6 @@ keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \
137keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \ 137keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
138 atimer.h systime.h character.h charset.h $(INTERVALS_H) \ 138 atimer.h systime.h character.h charset.h $(INTERVALS_H) \
139 keymap.h window.h coding.h frame.h lisp.h globals.h $(config_h) 139 keymap.h window.h coding.h frame.h lisp.h globals.h $(config_h)
140lastfile.o: lastfile.c $(config_h)
141macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h msdos.h \ 140macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h msdos.h \
142 dispextern.h lisp.h globals.h $(config_h) systime.h coding.h composite.h 141 dispextern.h lisp.h globals.h $(config_h) systime.h coding.h composite.h
143gmalloc.o: gmalloc.c $(config_h) 142gmalloc.o: gmalloc.c $(config_h)
diff --git a/src/firstfile.c b/src/firstfile.c
deleted file mode 100644
index 737757a2779..00000000000
--- a/src/firstfile.c
+++ /dev/null
@@ -1,32 +0,0 @@
1/* Mark beginning of data space to dump as pure, for GNU Emacs.
2 Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or (at
9your option) any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
18
19
20#include <config.h>
21
22#ifdef WINDOWSNT
23/* See comments in lastfile.c. */
24char my_begdata[] = "Beginning of Emacs initialized data";
25char my_begbss[1]; /* Do not initialize this variable. */
26static char _my_begbss[1];
27char * my_begbss_static = _my_begbss;
28
29/* Add a dummy reference to ensure emacs.o is linked in. */
30extern int main (int, char **);
31int (*dummy_main_reference) (int, char **) = main;
32#endif
diff --git a/src/lastfile.c b/src/lastfile.c
deleted file mode 100644
index 9f2b2a04958..00000000000
--- a/src/lastfile.c
+++ /dev/null
@@ -1,44 +0,0 @@
1/* Mark end of data space to dump as pure, for GNU Emacs.
2 Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or (at
9your option) any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
18
19
20/* How this works:
21
22 Fdump_emacs dumps everything up to my_edata as text space (pure).
23
24 The files of Emacs are written so as to have no initialized
25 data that can ever need to be altered except at the first startup.
26 This is so that those words can be dumped as shareable text.
27
28 It is not possible to exercise such control over library files.
29 So it is necessary to refrain from making their data areas shared.
30 Therefore, this file is loaded following all the files of Emacs
31 but before library files.
32 As a result, the symbol my_edata indicates the point
33 in data space between data coming from Emacs and data
34 coming from libraries.
35*/
36
37#include <config.h>
38
39#include "lisp.h"
40
41#if (!defined SYSTEM_MALLOC \
42 || defined WINDOWSNT || defined CYGWIN || defined DARWIN_OS)
43char my_edata[] = "End of Emacs initialized data";
44#endif