emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100928: Clean up unexec.c, remove re


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100928: Clean up unexec.c, remove references to unused code.
Date: Wed, 28 Jul 2010 20:25:08 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100928
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Wed 2010-07-28 20:25:08 -0700
message:
  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.
modified:
  admin/CPP-DEFINES
  nt/ChangeLog
  nt/config.nt
  src/ChangeLog
  src/m/alpha.h
  src/m/arm.h
  src/m/intel386.h
  src/m/m68k.h
  src/m/sparc.h
  src/m/template.h
  src/s/hpux10-20.h
  src/s/ms-w32.h
  src/s/msdos.h
  src/s/template.h
  src/s/usg5-4.h
  src/unexec.c
=== modified file 'admin/CPP-DEFINES'
--- a/admin/CPP-DEFINES 2010-07-11 10:31:10 +0000
+++ b/admin/CPP-DEFINES 2010-07-29 03:25:08 +0000
@@ -65,7 +65,6 @@
 EXPLICIT_SIGN_EXTEND
 LOAD_AVE_CVT
 LOAD_AVE_TYPE
-NO_REMAP
 VIRT_ADDR_VARIES
 WORDS_BIG_ENDIAN
 
@@ -190,7 +189,6 @@
 HAVE_UNISTD_H
 HAVE_UTIMES
 HAVE_UTIME_H
-HAVE_VOLATILE
 HAVE_WINDOW_SYSTEM
 HAVE_WORKING_VFORK
 HAVE_XRMSETDATABASE
@@ -237,7 +235,6 @@
 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 @@
 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

=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog      2010-07-25 03:53:37 +0000
+++ b/nt/ChangeLog      2010-07-29 03:25:08 +0000
@@ -1,3 +1,7 @@
+2010-07-29  Dan Nicolaescu  <address@hidden>
+
+       * config.nt: Remove code referring to NO_REMAP, unused.
+
 2010-07-25  Christoph Scholtes  <address@hidden>
 
        Build binary distros on Windows using emacs-VERSION as root dir name.

=== modified file 'nt/config.nt'
--- a/nt/config.nt      2010-07-12 18:16:54 +0000
+++ b/nt/config.nt      2010-07-29 03:25:08 +0000
@@ -308,12 +308,6 @@
 #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).

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-07-29 02:42:53 +0000
+++ b/src/ChangeLog     2010-07-29 03:25:08 +0000
@@ -1,3 +1,19 @@
+2010-07-29  Dan Nicolaescu  <address@hidden>
+
+       * 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  <address@hidden>
 
        * xsettings.c (Ftool_bar_get_system_style): Also check for

=== modified file 'src/m/alpha.h'
--- a/src/m/alpha.h     2010-07-08 03:03:52 +0000
+++ b/src/m/alpha.h     2010-07-29 03:25:08 +0000
@@ -64,12 +64,6 @@
    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:

=== modified file 'src/m/arm.h'
--- a/src/m/arm.h       2010-05-12 03:01:16 +0000
+++ b/src/m/arm.h       2010-07-29 03:25:08 +0000
@@ -22,7 +22,5 @@
    is the most significant byte.  */
 #undef WORDS_BIG_ENDIAN
 
-#define NO_REMAP
-
 /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42
    (do not change this comment) */

=== modified file 'src/m/intel386.h'
--- a/src/m/intel386.h  2010-07-08 03:03:52 +0000
+++ b/src/m/intel386.h  2010-07-29 03:25:08 +0000
@@ -32,8 +32,6 @@
 /* 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

=== modified file 'src/m/m68k.h'
--- a/src/m/m68k.h      2010-07-08 03:03:52 +0000
+++ b/src/m/m68k.h      2010-07-29 03:25:08 +0000
@@ -40,7 +40,6 @@
 #define DATA_SEG_BITS 0x80000000
 #endif
 
-#define NO_REMAP
 #endif
 
 /* arch-tag: 4eadd161-b4e8-4b82-82a1-e4ce7f42969d

=== modified file 'src/m/sparc.h'
--- a/src/m/sparc.h     2010-05-12 02:37:59 +0000
+++ b/src/m/sparc.h     2010-07-29 03:25:08 +0000
@@ -34,9 +34,6 @@
 /* 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

=== modified file 'src/m/template.h'
--- a/src/m/template.h  2010-06-30 02:48:54 +0000
+++ b/src/m/template.h  2010-07-29 03:25:08 +0000
@@ -47,12 +47,6 @@
    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

=== modified file 'src/s/hpux10-20.h'
--- a/src/s/hpux10-20.h 2010-07-11 10:31:10 +0000
+++ b/src/s/hpux10-20.h 2010-07-29 03:25:08 +0000
@@ -113,12 +113,6 @@
    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.

=== modified file 'src/s/ms-w32.h'
--- a/src/s/ms-w32.h    2010-07-12 16:56:59 +0000
+++ b/src/s/ms-w32.h    2010-07-29 03:25:08 +0000
@@ -62,10 +62,6 @@
    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
 

=== modified file 'src/s/msdos.h'
--- a/src/s/msdos.h     2010-07-12 16:56:59 +0000
+++ b/src/s/msdos.h     2010-07-29 03:25:08 +0000
@@ -45,10 +45,6 @@
    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 @@
 #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) */

=== modified file 'src/s/template.h'
--- a/src/s/template.h  2010-06-30 02:48:54 +0000
+++ b/src/s/template.h  2010-07-29 03:25:08 +0000
@@ -85,11 +85,6 @@
 
 /* #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.  */

=== modified file 'src/s/usg5-4.h'
--- a/src/s/usg5-4.h    2010-07-11 10:31:10 +0000
+++ b/src/s/usg5-4.h    2010-07-29 03:25:08 +0000
@@ -56,8 +56,6 @@
 /* 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.  */

=== modified file 'src/unexec.c'
--- a/src/unexec.c      2010-07-08 03:03:52 +0000
+++ b/src/unexec.c      2010-07-29 03:25:08 +0000
@@ -48,8 +48,6 @@
  *
  * 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 @@
  * of Dell Computer Corporation.  address@hidden
  */
 
-/* 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 @@
   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 @@
      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 @@
       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);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]