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.
This commit is contained in:
parent
087b38a075
commit
76fd1ee9bd
16 changed files with 20 additions and 142 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
88
src/unexec.c
88
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue