diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2008-02-09 18:03:10 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2008-02-09 18:03:10 +0000 |
commit | 4624371d9a4c1a078bcb7a305adb0520cd8975bc (patch) | |
tree | 3e976f55d9448bda9ab36215bd5673c0eab68d45 /src/unexec.c | |
parent | 87e391bb24d57ce8c27226542ba11ea5f924689d (diff) | |
download | emacs-4624371d9a4c1a078bcb7a305adb0520cd8975bc.tar.gz |
* 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.
Diffstat (limited to 'src/unexec.c')
-rw-r--r-- | src/unexec.c | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/src/unexec.c b/src/unexec.c index 4ecb239c137..2ca70b752ec 100644 --- a/src/unexec.c +++ b/src/unexec.c @@ -133,11 +133,6 @@ thus, the amount of offset can depend on the data in the file. 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 @@ pointer looks like an int) but not on all machines. #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 @@ extern char *sbrk (); #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 OLDMAGIC = {MY_ID, SHARE_MAGIC}; 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 @@ static struct bhdr hdr, ohdr; (((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 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) #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 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) #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 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) 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 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) = (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 @@ copy_text_and_data (new, a_out) 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); |