summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2010-07-28 20:25:08 -0700
committerDan Nicolaescu <dann@ics.uci.edu>2010-07-28 20:25:08 -0700
commit76fd1ee9bd6e22602ed4df4350daeb375f67e16a (patch)
tree3628a3c341f6b0750837768a5efcb6d5c44faf6f
parent087b38a075e28408c397252f3756af9d3ac23e87 (diff)
downloademacs-76fd1ee9bd6e22602ed4df4350daeb375f67e16a.tar.gz
Clean up unexec.c, remove references to unused code.
* nt/config.nt: Remove code referring to NO_REMAP, unused. * src/unexec.c (make_hdr): Remove references to NO_REMAP, COFF, SEGMENT_MASK, SECTION_ALIGNMENT, ADJUST_EXEC_HEADER. * src/s/usg5-4.h (COFF): * src/s/template.h: * src/s/msdos.h (COFF, NO_REMAP): * src/s/ms-w32.h (NO_REMAP): * src/s/hpux10-20.h (NO_REMAP): * src/m/sparc.h (SEGMENT_MASK): * src/m/m68k.h (NO_REMAP): * src/m/intel386.h (SEGMENT_MASK): * src/m/arm.h (NO_REMAP): * src/m/alpha.h (COFF): * src/m/template.h: Remove references to unused defines.
-rw-r--r--admin/CPP-DEFINES5
-rw-r--r--nt/ChangeLog4
-rw-r--r--nt/config.nt6
-rw-r--r--src/ChangeLog16
-rw-r--r--src/m/alpha.h6
-rw-r--r--src/m/arm.h2
-rw-r--r--src/m/intel386.h2
-rw-r--r--src/m/m68k.h1
-rw-r--r--src/m/sparc.h3
-rw-r--r--src/m/template.h6
-rw-r--r--src/s/hpux10-20.h6
-rw-r--r--src/s/ms-w32.h4
-rw-r--r--src/s/msdos.h6
-rw-r--r--src/s/template.h5
-rw-r--r--src/s/usg5-4.h2
-rw-r--r--src/unexec.c88
16 files changed, 20 insertions, 142 deletions
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index b647370a781..81c199218f0 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -65,7 +65,6 @@ SYSTEM_TYPE
EXPLICIT_SIGN_EXTEND
LOAD_AVE_CVT
LOAD_AVE_TYPE
-NO_REMAP
VIRT_ADDR_VARIES
WORDS_BIG_ENDIAN
@@ -190,7 +189,6 @@ HAVE_TZSET
HAVE_UNISTD_H
HAVE_UTIMES
HAVE_UTIME_H
-HAVE_VOLATILE
HAVE_WINDOW_SYSTEM
HAVE_WORKING_VFORK
HAVE_XRMSETDATABASE
@@ -237,7 +235,6 @@ PTY_TTY_NAME_SPRINTF
PURESIZE
RUN_TIME_REMAP
SA_RESTART
-SECTION_ALIGNMENT -- was only used by s/lynxos.h, maybe all code depending on it can be removed.
SEGMENT_MASK
SETPGRP_RELEASES_CTTY
SETUP_SLAVE_PTY
@@ -252,14 +249,12 @@ SIGTRAP
SIGTYPE
SOLARIS2
STDC_HEADERS
-SYMS_SYSTEM
SYSTEM_PURESIZE_EXTRA
SYSTEM_MALLOC
SYSV_SYSTEM_DIR
TAB3
TABDLY
TERM
-THIS_IS_CONFIGURE
TIME_WITH_SYS_TIME
TIOCSIGSEND
TM_IN_SYS_TIME
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 4dfdd16fd32..4de3a5430b5 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-29 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * config.nt: Remove code referring to NO_REMAP, unused.
+
2010-07-25 Christoph Scholtes <cschol2112@gmail.com>
Build binary distros on Windows using emacs-VERSION as root dir name.
diff --git a/nt/config.nt b/nt/config.nt
index 683070f1063..676c3372746 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -308,12 +308,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef config_machfile
#include "m/intel386.h"
-/* If no remapping takes place, static variables cannot be dumped as
- pure, so don't worry about the `static' keyword. */
-#ifdef NO_REMAP
-#undef static
-#endif
-
/* Define `subprocesses' should be defined if you want to
have code for asynchronous subprocesses
(as used in M-x compile and M-x shell).
diff --git a/src/ChangeLog b/src/ChangeLog
index d85fdf97be9..ab6f98e8bd9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
+2010-07-29 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * unexec.c (make_hdr): Remove references to NO_REMAP, COFF,
+ SEGMENT_MASK, SECTION_ALIGNMENT, ADJUST_EXEC_HEADER.
+ * s/usg5-4.h (COFF):
+ * s/template.h:
+ * s/msdos.h (COFF, NO_REMAP):
+ * s/ms-w32.h (NO_REMAP):
+ * s/hpux10-20.h (NO_REMAP):
+ * m/sparc.h (SEGMENT_MASK):
+ * m/m68k.h (NO_REMAP):
+ * m/intel386.h (SEGMENT_MASK):
+ * m/arm.h (NO_REMAP):
+ * m/alpha.h (COFF):
+ * m/template.h: Remove references to unused defines.
+
2010-07-28 Jan Djärv <jan.h.d@swipnet.se>
* xsettings.c (Ftool_bar_get_system_style): Also check for
diff --git a/src/m/alpha.h b/src/m/alpha.h
index ae8fd62d6f8..5a0168417cb 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -64,12 +64,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
termio and struct termios are mutually incompatible. */
#define NO_TERMIO
-#if defined (GNU_LINUX) || defined (__NetBSD__) || defined (__OpenBSD__)
-# ifndef __ELF__
-# define COFF
-# endif /* notdef __ELF__ */
-#endif
-
/* Many Alpha implementations (e.g. gas 2.8) can't handle DBL_MIN:
they generate code that uses a signaling NaN instead of DBL_MIN.
Define DBL_MIN_REPLACEMENT to be the next value larger than DBL_MIN:
diff --git a/src/m/arm.h b/src/m/arm.h
index cf30e2e1b19..ee5d6c77844 100644
--- a/src/m/arm.h
+++ b/src/m/arm.h
@@ -22,7 +22,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
is the most significant byte. */
#undef WORDS_BIG_ENDIAN
-#define NO_REMAP
-
/* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42
(do not change this comment) */
diff --git a/src/m/intel386.h b/src/m/intel386.h
index 76e5929e4e6..2931e9a2284 100644
--- a/src/m/intel386.h
+++ b/src/m/intel386.h
@@ -32,8 +32,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */
/* we cannot get the maximum address for brk */
#define ULIMIT_BREAK_VALUE (32*1024*1024)
-
-#define SEGMENT_MASK ((SEGMENT_SIZE)-1)
#endif
/* arch-tag: 746338f0-cb7b-4f49-a98c-cb50817cf2ec
diff --git a/src/m/m68k.h b/src/m/m68k.h
index 5a083205e50..2286cbce5e6 100644
--- a/src/m/m68k.h
+++ b/src/m/m68k.h
@@ -40,7 +40,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define DATA_SEG_BITS 0x80000000
#endif
-#define NO_REMAP
#endif
/* arch-tag: 4eadd161-b4e8-4b82-82a1-e4ce7f42969d
diff --git a/src/m/sparc.h b/src/m/sparc.h
index 39240dcbf5c..6c2c71c4045 100644
--- a/src/m/sparc.h
+++ b/src/m/sparc.h
@@ -34,9 +34,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Convert that into an integer that is 100 for a load average of 1.0 */
#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
-/* Mask for address bits within a memory segment */
-#define SEGMENT_MASK (SEGSIZ - 1)
-
#ifdef __arch64__ /* GCC, 64-bit ABI. */
#define BITS_PER_LONG 64
diff --git a/src/m/template.h b/src/m/template.h
index 0b149411a0a..7e067849813 100644
--- a/src/m/template.h
+++ b/src/m/template.h
@@ -47,12 +47,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
numerically. */
#define VIRT_ADDR_VARIES
-/* Define NO_REMAP if memory segmentation makes it not work well
- to change the boundary between the text section and data section
- when Emacs is dumped. If you define this, the preloaded Lisp
- code will not be sharable; but that's better than failing completely. */
-#define NO_REMAP
-
/* After adding support for a new machine, modify the large case
statement in configure.in to recognize reasonable
configuration names, and add a description of the system to
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h
index ee841041edb..ee0fa9abe02 100644
--- a/src/s/hpux10-20.h
+++ b/src/s/hpux10-20.h
@@ -113,12 +113,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
on HP-UX. (You get duplicate symbol errors on linking). */
#undef _FILE_OFFSET_BITS
-/* Define NO_REMAP if memory segmentation makes it not work well
- to change the boundary between the text section and data section
- when Emacs is dumped. If you define this, the preloaded Lisp
- code will not be sharable; but that's better than failing completely. */
-#define NO_REMAP
-
/* Define VIRT_ADDR_VARIES if the virtual addresses of
pure and impure space as loaded can vary, and even their
relative order cannot be relied on.
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index b3e9db8be8a..f61fae57eff 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -62,10 +62,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
for received packets, so datagrams are broken too. */
#define BROKEN_DATAGRAM_SOCKETS 1
-/* If your system uses COFF (Common Object File Format) then define the
- preprocessor symbol "COFF". */
-#define COFF 1
-
#define MAIL_USE_POP 1
#define MAIL_USE_SYSTEM_LOCK 1
diff --git a/src/s/msdos.h b/src/s/msdos.h
index b76b583250c..ffbae8777e2 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -45,10 +45,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
This is the only system that needs this. */
#undef subprocesses
-/* If your system uses COFF (Common Object File Format) then define the
- preprocessor symbol "COFF". */
-#define COFF
-
/* Here, on a separate page, add any special hacks needed to make
Emacs work on this system. For example, you might define certain
system call names that don't exist on your system, or that do
@@ -131,7 +127,5 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#define GC_SETJMP_WORKS 1
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
-#define NO_REMAP
-
/* arch-tag: d184f860-815d-4ff4-8187-d05c0f3c37d0
(do not change this comment) */
diff --git a/src/s/template.h b/src/s/template.h
index 67ed13e6180..dd1e56f8553 100644
--- a/src/s/template.h
+++ b/src/s/template.h
@@ -85,11 +85,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* #undef subprocesses */
-/* If your system uses COFF (Common Object File Format) then define the
- preprocessor symbol "COFF". */
-
-/* #define COFF */
-
/* Define CLASH_DETECTION if you want lock files to be written
so that Emacs can tell instantly when you try to modify
a file that someone else has modified in his Emacs. */
diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h
index b92a5bbb450..0fcc6623450 100644
--- a/src/s/usg5-4.h
+++ b/src/s/usg5-4.h
@@ -56,8 +56,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* On USG systems signal handlers return void. */
#define SIGTYPE void
-#undef COFF
-
/* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars.
But get <termio.h> first to make sure ttold.h doesn't interfere.
And don't try to use SIGIO yet. */
diff --git a/src/unexec.c b/src/unexec.c
index 8edd9e22b96..f7f93b066de 100644
--- a/src/unexec.c
+++ b/src/unexec.c
@@ -48,8 +48,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
*
* Specifying zero for data_start means the boundary between text and data
* should not be the same as when the program was loaded.
- * If NO_REMAP is defined, the argument data_start is ignored and the
- * segment boundaries are never changed.
*
* Bss_start indicates how much of the data segment is to be saved in the
* a.out file and restored when the program is executed. It gives the lowest
@@ -69,56 +67,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
* of Dell Computer Corporation. james@bigtex.cactus.org.
*/
-/* There are several compilation parameters affecting unexec:
-
-* COFF
-
-Define this if your system uses COFF for executables.
-
-* NO_REMAP
-
-Define this if you do not want to try to save Emacs's pure data areas
-as part of the text segment.
-
-Saving them as text is good because it allows users to share more.
-
-However, on machines that locate the text area far from the data area,
-the boundary cannot feasibly be moved. Such machines require
-NO_REMAP.
-
-Also, remapping can cause trouble with the built-in startup routine
-/lib/crt0.o, which defines `environ' as an initialized variable.
-Dumping `environ' as pure does not work! So, to use remapping,
-you must write a startup routine for your machine in Emacs's crt0.c.
-If NO_REMAP is defined, Emacs uses the system's crt0.o.
-
-* SECTION_ALIGNMENT
-
-Some machines that use COFF executables require that each section
-start on a certain boundary *in the COFF file*. Such machines should
-define SECTION_ALIGNMENT to a mask of the low-order bits that must be
-zero on such a boundary. This mask is used to control padding between
-segments in the COFF file.
-
-If SECTION_ALIGNMENT is not defined, the segments are written
-consecutively with no attempt at alignment. This is right for
-unmodified system V.
-
-* SEGMENT_MASK
-
-Some machines require that the beginnings and ends of segments
-*in core* be on certain boundaries. For most machines, a page
-boundary is sufficient. That is the default. When a larger
-boundary is needed, define SEGMENT_MASK to a mask of
-the bits that must be zero on such a boundary.
-
-* ADJUST_EXEC_HEADER
-
-This macro can be used to generate statements to adjust or
-initialize nonstandard fields in the file header
-
-*/
-
#ifndef emacs
#define PERROR(arg) perror (arg); return -1
#else
@@ -264,19 +212,9 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
pagemask = getpagesize () - 1;
/* Adjust text/data boundary. */
-#ifdef NO_REMAP
data_start = (int) start_of_data ();
-#else /* not NO_REMAP */
- if (!data_start)
- data_start = (int) start_of_data ();
-#endif /* not NO_REMAP */
data_start = ADDR_CORRECT (data_start);
-
-#ifdef SEGMENT_MASK
- data_start = data_start & ~SEGMENT_MASK; /* (Down) to segment boundary. */
-#else
data_start = data_start & ~pagemask; /* (Down) to page boundary. */
-#endif
bss_end = ADDR_CORRECT (sbrk (0)) + pagemask;
bss_end &= ~ pagemask;
@@ -374,42 +312,20 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
to correspond to what we want to dump. */
f_hdr.f_flags |= (F_RELFLG | F_EXEC);
-#ifndef NO_REMAP
f_ohdr.text_start = (long) start_of_text ();
f_ohdr.tsize = data_start - f_ohdr.text_start;
f_ohdr.data_start = data_start;
-#endif /* NO_REMAP */
f_ohdr.dsize = bss_start - f_ohdr.data_start;
f_ohdr.bsize = bss_end - bss_start;
- /* On some machines, the old values are right.
- ??? Maybe on all machines with NO_REMAP. */
f_thdr.s_size = f_ohdr.tsize;
f_thdr.s_scnptr = sizeof (f_hdr) + sizeof (f_ohdr);
f_thdr.s_scnptr += (f_hdr.f_nscns) * (sizeof (f_thdr));
lnnoptr = f_thdr.s_lnnoptr;
-#ifdef SECTION_ALIGNMENT
- /* Some systems require special alignment
- of the sections in the file itself. */
- f_thdr.s_scnptr
- = (f_thdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT;
-#endif /* SECTION_ALIGNMENT */
text_scnptr = f_thdr.s_scnptr;
f_dhdr.s_paddr = f_ohdr.data_start;
f_dhdr.s_vaddr = f_ohdr.data_start;
f_dhdr.s_size = f_ohdr.dsize;
f_dhdr.s_scnptr = f_thdr.s_scnptr + f_thdr.s_size;
-#ifdef SECTION_ALIGNMENT
- /* Some systems require special alignment
- of the sections in the file itself. */
- f_dhdr.s_scnptr
- = (f_dhdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT;
-#endif /* SECTION_ALIGNMENT */
-#ifdef DATA_SECTION_ALIGNMENT
- /* Some systems require special alignment
- of the data section only. */
- f_dhdr.s_scnptr
- = (f_dhdr.s_scnptr + DATA_SECTION_ALIGNMENT) & ~DATA_SECTION_ALIGNMENT;
-#endif /* DATA_SECTION_ALIGNMENT */
data_scnptr = f_dhdr.s_scnptr;
f_bhdr.s_paddr = f_ohdr.data_start + f_ohdr.dsize;
f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize;
@@ -427,10 +343,6 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
f_thdr.s_lnnoptr += bias;
}
-#ifdef ADJUST_EXEC_HEADER
- ADJUST_EXEC_HEADER;
-#endif /* ADJUST_EXEC_HEADER */
-
if (write (new, &f_hdr, sizeof (f_hdr)) != sizeof (f_hdr))
{
PERROR (new_name);