Mercurial > emacs
diff src/unexec.c @ 91702:b7a5a89054dc
* configure.in (LIBX11_MACHINE, HAVE_XFREE386): Remove code
dealing with obsolete variables.
* fakemail.c (MAIL_PROGRAM_NAME): Remove unused conditional.
(main): Replace MAIL_PROGRAM_NAME with its value.
* src/Makefile.in:
* src/emacs.c:
* src/gmalloc.c:
* src/keyboard.c:
* src/lisp.h:
* src/m/ibm370aix.h:
* src/process.c:
* src/regex.c:
* src/s/hpux.h:
* src/sysdep.c:
* src/sysselect.h:
* src/systty.h:
* src/unexec.c:
* src/w32term.c:
* src/xsmfns.c:
* src/xterm.c: Remove code that deals with obsolete variables.
* s/msdos.h (DONT_NEED_ENVIRON): Don't define.
* ecrt0.c: Replace the DONT_NEED_ENVIRON test with MSDOS test,
nothing else needs it anymore.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 09 Feb 2008 18:03:10 +0000 |
parents | 0a928dba3639 |
children | 8971ddf55736 |
line wrap: on
line diff
--- a/src/unexec.c Sat Feb 09 14:06:47 2008 +0000 +++ b/src/unexec.c Sat Feb 09 18:03:10 2008 +0000 @@ -133,11 +133,6 @@ If defined, this macro specifies the number of bytes to seek into the a.out file before starting to write the text segment. -* EXEC_MAGIC - -For machines using COFF, this macro, if defined, is a value stored -into the magic number field of the output file. - * ADJUST_EXEC_HEADER This macro can be used to generate statements to adjust or @@ -157,7 +152,6 @@ #ifndef emacs #define PERROR(arg) perror (arg); return -1 #else -#define IN_UNEXEC #include <config.h> #define PERROR(file) report_error (file, new) #endif @@ -256,11 +250,6 @@ #define SYMS_START ((long) N_SYMOFF (ohdr)) -/* Some machines override the structure name for an a.out header. */ -#ifndef EXEC_HDR_TYPE -#define EXEC_HDR_TYPE struct exec -#endif - #ifdef HPUX #ifdef HP9000S200_ID #define MY_ID HP9000S200_ID @@ -272,11 +261,11 @@ static MAGIC NEWMAGIC = {MY_ID, DEMAND_MAGIC}; #define N_TXTOFF(x) TEXT_OFFSET(x) #define N_SYMOFF(x) LESYM_OFFSET(x) -static EXEC_HDR_TYPE hdr, ohdr; +static struct exec hdr, ohdr; #else /* not HPUX */ -#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (GNU_LINUX) +#if defined (USG) && !defined (IRIS) && !defined (GNU_LINUX) static struct bhdr hdr, ohdr; #define a_magic fmagic #define a_text tsize @@ -290,10 +279,10 @@ (((x).fmagic)!=OMAGIC && ((x).fmagic)!=NMAGIC &&\ ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC) #define NEWMAGIC FMAGIC -#else /* IRIS or IBMAIX or not USG */ -static EXEC_HDR_TYPE hdr, ohdr; +#else /* IRIS or not USG */ +static struct exec hdr, ohdr; #define NEWMAGIC ZMAGIC -#endif /* IRIS or IBMAIX not USG */ +#endif /* IRIS or not USG */ #endif /* not HPUX */ static int unexec_text_start; @@ -504,12 +493,6 @@ #endif f_hdr.f_flags |= (F_RELFLG | F_EXEC); -#ifdef TPIX - f_hdr.f_nscns = 3; -#endif -#ifdef EXEC_MAGIC - f_ohdr.magic = EXEC_MAGIC; -#endif #ifndef NO_REMAP f_ohdr.text_start = (long) start_of_text (); f_ohdr.tsize = data_start - f_ohdr.text_start; @@ -517,13 +500,11 @@ #endif /* NO_REMAP */ f_ohdr.dsize = bss_start - f_ohdr.data_start; f_ohdr.bsize = bss_end - bss_start; -#ifndef KEEP_OLD_TEXT_SCNPTR /* 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)); -#endif /* KEEP_OLD_TEXT_SCNPTR */ #ifdef ADJUST_TEXT_SCNHDR_SIZE /* On some machines, `text size' includes all headers. */ f_thdr.s_size -= f_thdr.s_scnptr; @@ -535,16 +516,8 @@ f_thdr.s_scnptr = (f_thdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT; #endif /* SECTION_ALIGNMENT */ -#ifdef TPIX - f_thdr.s_scnptr = 0xd0; -#endif text_scnptr = f_thdr.s_scnptr; -#ifdef ADJUST_TEXTBASE - text_scnptr = sizeof (f_hdr) + sizeof (f_ohdr) + (f_hdr.f_nscns) * (sizeof (f_thdr)); -#endif -#ifndef KEEP_OLD_PADDR f_dhdr.s_paddr = f_ohdr.data_start; -#endif /* KEEP_OLD_PADDR */ 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; @@ -561,9 +534,7 @@ = (f_dhdr.s_scnptr + DATA_SECTION_ALIGNMENT) & ~DATA_SECTION_ALIGNMENT; #endif /* DATA_SECTION_ALIGNMENT */ data_scnptr = f_dhdr.s_scnptr; -#ifndef KEEP_OLD_PADDR f_bhdr.s_paddr = f_ohdr.data_start + f_ohdr.dsize; -#endif /* KEEP_OLD_PADDR */ f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize; f_bhdr.s_size = f_ohdr.bsize; f_bhdr.s_scnptr = 0L; @@ -874,10 +845,6 @@ lseek (new, (long) text_scnptr, 0); ptr = (char *) f_ohdr.text_start; -#ifdef HEADER_INCL_IN_TEXT - /* For Gould UTX/32, text starts after headers */ - ptr = (char *) (ptr + text_scnptr); -#endif /* HEADER_INCL_IN_TEXT */ end = ptr + f_ohdr.tsize; write_segment (new, ptr, end);