diff options
| author | Dan Nicolaescu | 2010-07-28 20:25:08 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-28 20:25:08 -0700 |
| commit | 76fd1ee9bd6e22602ed4df4350daeb375f67e16a (patch) | |
| tree | 3628a3c341f6b0750837768a5efcb6d5c44faf6f /src | |
| parent | 087b38a075e28408c397252f3756af9d3ac23e87 (diff) | |
| download | emacs-76fd1ee9bd6e22602ed4df4350daeb375f67e16a.tar.gz emacs-76fd1ee9bd6e22602ed4df4350daeb375f67e16a.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 16 | ||||
| -rw-r--r-- | src/m/alpha.h | 6 | ||||
| -rw-r--r-- | src/m/arm.h | 2 | ||||
| -rw-r--r-- | src/m/intel386.h | 2 | ||||
| -rw-r--r-- | src/m/m68k.h | 1 | ||||
| -rw-r--r-- | src/m/sparc.h | 3 | ||||
| -rw-r--r-- | src/m/template.h | 6 | ||||
| -rw-r--r-- | src/s/hpux10-20.h | 6 | ||||
| -rw-r--r-- | src/s/ms-w32.h | 4 | ||||
| -rw-r--r-- | src/s/msdos.h | 6 | ||||
| -rw-r--r-- | src/s/template.h | 5 | ||||
| -rw-r--r-- | src/s/usg5-4.h | 2 | ||||
| -rw-r--r-- | src/unexec.c | 88 |
13 files changed, 16 insertions, 131 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d85fdf97be9..ab6f98e8bd9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2010-07-29 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * unexec.c (make_hdr): Remove references to NO_REMAP, COFF, | ||
| 4 | SEGMENT_MASK, SECTION_ALIGNMENT, ADJUST_EXEC_HEADER. | ||
| 5 | * s/usg5-4.h (COFF): | ||
| 6 | * s/template.h: | ||
| 7 | * s/msdos.h (COFF, NO_REMAP): | ||
| 8 | * s/ms-w32.h (NO_REMAP): | ||
| 9 | * s/hpux10-20.h (NO_REMAP): | ||
| 10 | * m/sparc.h (SEGMENT_MASK): | ||
| 11 | * m/m68k.h (NO_REMAP): | ||
| 12 | * m/intel386.h (SEGMENT_MASK): | ||
| 13 | * m/arm.h (NO_REMAP): | ||
| 14 | * m/alpha.h (COFF): | ||
| 15 | * m/template.h: Remove references to unused defines. | ||
| 16 | |||
| 1 | 2010-07-28 Jan Djärv <jan.h.d@swipnet.se> | 17 | 2010-07-28 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 18 | ||
| 3 | * xsettings.c (Ftool_bar_get_system_style): Also check for | 19 | * 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/>. */ | |||
| 64 | termio and struct termios are mutually incompatible. */ | 64 | termio and struct termios are mutually incompatible. */ |
| 65 | #define NO_TERMIO | 65 | #define NO_TERMIO |
| 66 | 66 | ||
| 67 | #if defined (GNU_LINUX) || defined (__NetBSD__) || defined (__OpenBSD__) | ||
| 68 | # ifndef __ELF__ | ||
| 69 | # define COFF | ||
| 70 | # endif /* notdef __ELF__ */ | ||
| 71 | #endif | ||
| 72 | |||
| 73 | /* Many Alpha implementations (e.g. gas 2.8) can't handle DBL_MIN: | 67 | /* Many Alpha implementations (e.g. gas 2.8) can't handle DBL_MIN: |
| 74 | they generate code that uses a signaling NaN instead of DBL_MIN. | 68 | they generate code that uses a signaling NaN instead of DBL_MIN. |
| 75 | Define DBL_MIN_REPLACEMENT to be the next value larger than DBL_MIN: | 69 | 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/>. */ | |||
| 22 | is the most significant byte. */ | 22 | is the most significant byte. */ |
| 23 | #undef WORDS_BIG_ENDIAN | 23 | #undef WORDS_BIG_ENDIAN |
| 24 | 24 | ||
| 25 | #define NO_REMAP | ||
| 26 | |||
| 27 | /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42 | 25 | /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42 |
| 28 | (do not change this comment) */ | 26 | (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/>. */ | |||
| 32 | /* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */ | 32 | /* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */ |
| 33 | /* we cannot get the maximum address for brk */ | 33 | /* we cannot get the maximum address for brk */ |
| 34 | #define ULIMIT_BREAK_VALUE (32*1024*1024) | 34 | #define ULIMIT_BREAK_VALUE (32*1024*1024) |
| 35 | |||
| 36 | #define SEGMENT_MASK ((SEGMENT_SIZE)-1) | ||
| 37 | #endif | 35 | #endif |
| 38 | 36 | ||
| 39 | /* arch-tag: 746338f0-cb7b-4f49-a98c-cb50817cf2ec | 37 | /* 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/>. */ | |||
| 40 | #define DATA_SEG_BITS 0x80000000 | 40 | #define DATA_SEG_BITS 0x80000000 |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | #define NO_REMAP | ||
| 44 | #endif | 43 | #endif |
| 45 | 44 | ||
| 46 | /* arch-tag: 4eadd161-b4e8-4b82-82a1-e4ce7f42969d | 45 | /* 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/>. */ | |||
| 34 | /* Convert that into an integer that is 100 for a load average of 1.0 */ | 34 | /* Convert that into an integer that is 100 for a load average of 1.0 */ |
| 35 | #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) | 35 | #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) |
| 36 | 36 | ||
| 37 | /* Mask for address bits within a memory segment */ | ||
| 38 | #define SEGMENT_MASK (SEGSIZ - 1) | ||
| 39 | |||
| 40 | #ifdef __arch64__ /* GCC, 64-bit ABI. */ | 37 | #ifdef __arch64__ /* GCC, 64-bit ABI. */ |
| 41 | 38 | ||
| 42 | #define BITS_PER_LONG 64 | 39 | #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/>. */ | |||
| 47 | numerically. */ | 47 | numerically. */ |
| 48 | #define VIRT_ADDR_VARIES | 48 | #define VIRT_ADDR_VARIES |
| 49 | 49 | ||
| 50 | /* Define NO_REMAP if memory segmentation makes it not work well | ||
| 51 | to change the boundary between the text section and data section | ||
| 52 | when Emacs is dumped. If you define this, the preloaded Lisp | ||
| 53 | code will not be sharable; but that's better than failing completely. */ | ||
| 54 | #define NO_REMAP | ||
| 55 | |||
| 56 | /* After adding support for a new machine, modify the large case | 50 | /* After adding support for a new machine, modify the large case |
| 57 | statement in configure.in to recognize reasonable | 51 | statement in configure.in to recognize reasonable |
| 58 | configuration names, and add a description of the system to | 52 | 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/>. */ | |||
| 113 | on HP-UX. (You get duplicate symbol errors on linking). */ | 113 | on HP-UX. (You get duplicate symbol errors on linking). */ |
| 114 | #undef _FILE_OFFSET_BITS | 114 | #undef _FILE_OFFSET_BITS |
| 115 | 115 | ||
| 116 | /* Define NO_REMAP if memory segmentation makes it not work well | ||
| 117 | to change the boundary between the text section and data section | ||
| 118 | when Emacs is dumped. If you define this, the preloaded Lisp | ||
| 119 | code will not be sharable; but that's better than failing completely. */ | ||
| 120 | #define NO_REMAP | ||
| 121 | |||
| 122 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | 116 | /* Define VIRT_ADDR_VARIES if the virtual addresses of |
| 123 | pure and impure space as loaded can vary, and even their | 117 | pure and impure space as loaded can vary, and even their |
| 124 | relative order cannot be relied on. | 118 | 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/>. */ | |||
| 62 | for received packets, so datagrams are broken too. */ | 62 | for received packets, so datagrams are broken too. */ |
| 63 | #define BROKEN_DATAGRAM_SOCKETS 1 | 63 | #define BROKEN_DATAGRAM_SOCKETS 1 |
| 64 | 64 | ||
| 65 | /* If your system uses COFF (Common Object File Format) then define the | ||
| 66 | preprocessor symbol "COFF". */ | ||
| 67 | #define COFF 1 | ||
| 68 | |||
| 69 | #define MAIL_USE_POP 1 | 65 | #define MAIL_USE_POP 1 |
| 70 | #define MAIL_USE_SYSTEM_LOCK 1 | 66 | #define MAIL_USE_SYSTEM_LOCK 1 |
| 71 | 67 | ||
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 */ | |||
| 45 | This is the only system that needs this. */ | 45 | This is the only system that needs this. */ |
| 46 | #undef subprocesses | 46 | #undef subprocesses |
| 47 | 47 | ||
| 48 | /* If your system uses COFF (Common Object File Format) then define the | ||
| 49 | preprocessor symbol "COFF". */ | ||
| 50 | #define COFF | ||
| 51 | |||
| 52 | /* Here, on a separate page, add any special hacks needed to make | 48 | /* Here, on a separate page, add any special hacks needed to make |
| 53 | Emacs work on this system. For example, you might define certain | 49 | Emacs work on this system. For example, you might define certain |
| 54 | system call names that don't exist on your system, or that do | 50 | 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 */ | |||
| 131 | #define GC_SETJMP_WORKS 1 | 127 | #define GC_SETJMP_WORKS 1 |
| 132 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | 128 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
| 133 | 129 | ||
| 134 | #define NO_REMAP | ||
| 135 | |||
| 136 | /* arch-tag: d184f860-815d-4ff4-8187-d05c0f3c37d0 | 130 | /* arch-tag: d184f860-815d-4ff4-8187-d05c0f3c37d0 |
| 137 | (do not change this comment) */ | 131 | (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/>. */ | |||
| 85 | 85 | ||
| 86 | /* #undef subprocesses */ | 86 | /* #undef subprocesses */ |
| 87 | 87 | ||
| 88 | /* If your system uses COFF (Common Object File Format) then define the | ||
| 89 | preprocessor symbol "COFF". */ | ||
| 90 | |||
| 91 | /* #define COFF */ | ||
| 92 | |||
| 93 | /* Define CLASH_DETECTION if you want lock files to be written | 88 | /* Define CLASH_DETECTION if you want lock files to be written |
| 94 | so that Emacs can tell instantly when you try to modify | 89 | so that Emacs can tell instantly when you try to modify |
| 95 | a file that someone else has modified in his Emacs. */ | 90 | 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/>. */ | |||
| 56 | /* On USG systems signal handlers return void. */ | 56 | /* On USG systems signal handlers return void. */ |
| 57 | #define SIGTYPE void | 57 | #define SIGTYPE void |
| 58 | 58 | ||
| 59 | #undef COFF | ||
| 60 | |||
| 61 | /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars. | 59 | /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars. |
| 62 | But get <termio.h> first to make sure ttold.h doesn't interfere. | 60 | But get <termio.h> first to make sure ttold.h doesn't interfere. |
| 63 | And don't try to use SIGIO yet. */ | 61 | 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/>. */ | |||
| 48 | * | 48 | * |
| 49 | * Specifying zero for data_start means the boundary between text and data | 49 | * Specifying zero for data_start means the boundary between text and data |
| 50 | * should not be the same as when the program was loaded. | 50 | * should not be the same as when the program was loaded. |
| 51 | * If NO_REMAP is defined, the argument data_start is ignored and the | ||
| 52 | * segment boundaries are never changed. | ||
| 53 | * | 51 | * |
| 54 | * Bss_start indicates how much of the data segment is to be saved in the | 52 | * Bss_start indicates how much of the data segment is to be saved in the |
| 55 | * a.out file and restored when the program is executed. It gives the lowest | 53 | * 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/>. */ | |||
| 69 | * of Dell Computer Corporation. james@bigtex.cactus.org. | 67 | * of Dell Computer Corporation. james@bigtex.cactus.org. |
| 70 | */ | 68 | */ |
| 71 | 69 | ||
| 72 | /* There are several compilation parameters affecting unexec: | ||
| 73 | |||
| 74 | * COFF | ||
| 75 | |||
| 76 | Define this if your system uses COFF for executables. | ||
| 77 | |||
| 78 | * NO_REMAP | ||
| 79 | |||
| 80 | Define this if you do not want to try to save Emacs's pure data areas | ||
| 81 | as part of the text segment. | ||
| 82 | |||
| 83 | Saving them as text is good because it allows users to share more. | ||
| 84 | |||
| 85 | However, on machines that locate the text area far from the data area, | ||
| 86 | the boundary cannot feasibly be moved. Such machines require | ||
| 87 | NO_REMAP. | ||
| 88 | |||
| 89 | Also, remapping can cause trouble with the built-in startup routine | ||
| 90 | /lib/crt0.o, which defines `environ' as an initialized variable. | ||
| 91 | Dumping `environ' as pure does not work! So, to use remapping, | ||
| 92 | you must write a startup routine for your machine in Emacs's crt0.c. | ||
| 93 | If NO_REMAP is defined, Emacs uses the system's crt0.o. | ||
| 94 | |||
| 95 | * SECTION_ALIGNMENT | ||
| 96 | |||
| 97 | Some machines that use COFF executables require that each section | ||
| 98 | start on a certain boundary *in the COFF file*. Such machines should | ||
| 99 | define SECTION_ALIGNMENT to a mask of the low-order bits that must be | ||
| 100 | zero on such a boundary. This mask is used to control padding between | ||
| 101 | segments in the COFF file. | ||
| 102 | |||
| 103 | If SECTION_ALIGNMENT is not defined, the segments are written | ||
| 104 | consecutively with no attempt at alignment. This is right for | ||
| 105 | unmodified system V. | ||
| 106 | |||
| 107 | * SEGMENT_MASK | ||
| 108 | |||
| 109 | Some machines require that the beginnings and ends of segments | ||
| 110 | *in core* be on certain boundaries. For most machines, a page | ||
| 111 | boundary is sufficient. That is the default. When a larger | ||
| 112 | boundary is needed, define SEGMENT_MASK to a mask of | ||
| 113 | the bits that must be zero on such a boundary. | ||
| 114 | |||
| 115 | * ADJUST_EXEC_HEADER | ||
| 116 | |||
| 117 | This macro can be used to generate statements to adjust or | ||
| 118 | initialize nonstandard fields in the file header | ||
| 119 | |||
| 120 | */ | ||
| 121 | |||
| 122 | #ifndef emacs | 70 | #ifndef emacs |
| 123 | #define PERROR(arg) perror (arg); return -1 | 71 | #define PERROR(arg) perror (arg); return -1 |
| 124 | #else | 72 | #else |
| @@ -264,19 +212,9 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) | |||
| 264 | pagemask = getpagesize () - 1; | 212 | pagemask = getpagesize () - 1; |
| 265 | 213 | ||
| 266 | /* Adjust text/data boundary. */ | 214 | /* Adjust text/data boundary. */ |
| 267 | #ifdef NO_REMAP | ||
| 268 | data_start = (int) start_of_data (); | 215 | data_start = (int) start_of_data (); |
| 269 | #else /* not NO_REMAP */ | ||
| 270 | if (!data_start) | ||
| 271 | data_start = (int) start_of_data (); | ||
| 272 | #endif /* not NO_REMAP */ | ||
| 273 | data_start = ADDR_CORRECT (data_start); | 216 | data_start = ADDR_CORRECT (data_start); |
| 274 | |||
| 275 | #ifdef SEGMENT_MASK | ||
| 276 | data_start = data_start & ~SEGMENT_MASK; /* (Down) to segment boundary. */ | ||
| 277 | #else | ||
| 278 | data_start = data_start & ~pagemask; /* (Down) to page boundary. */ | 217 | data_start = data_start & ~pagemask; /* (Down) to page boundary. */ |
| 279 | #endif | ||
| 280 | 218 | ||
| 281 | bss_end = ADDR_CORRECT (sbrk (0)) + pagemask; | 219 | bss_end = ADDR_CORRECT (sbrk (0)) + pagemask; |
| 282 | bss_end &= ~ pagemask; | 220 | bss_end &= ~ pagemask; |
| @@ -374,42 +312,20 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) | |||
| 374 | to correspond to what we want to dump. */ | 312 | to correspond to what we want to dump. */ |
| 375 | 313 | ||
| 376 | f_hdr.f_flags |= (F_RELFLG | F_EXEC); | 314 | f_hdr.f_flags |= (F_RELFLG | F_EXEC); |
| 377 | #ifndef NO_REMAP | ||
| 378 | f_ohdr.text_start = (long) start_of_text (); | 315 | f_ohdr.text_start = (long) start_of_text (); |
| 379 | f_ohdr.tsize = data_start - f_ohdr.text_start; | 316 | f_ohdr.tsize = data_start - f_ohdr.text_start; |
| 380 | f_ohdr.data_start = data_start; | 317 | f_ohdr.data_start = data_start; |
| 381 | #endif /* NO_REMAP */ | ||
| 382 | f_ohdr.dsize = bss_start - f_ohdr.data_start; | 318 | f_ohdr.dsize = bss_start - f_ohdr.data_start; |
| 383 | f_ohdr.bsize = bss_end - bss_start; | 319 | f_ohdr.bsize = bss_end - bss_start; |
| 384 | /* On some machines, the old values are right. | ||
| 385 | ??? Maybe on all machines with NO_REMAP. */ | ||
| 386 | f_thdr.s_size = f_ohdr.tsize; | 320 | f_thdr.s_size = f_ohdr.tsize; |
| 387 | f_thdr.s_scnptr = sizeof (f_hdr) + sizeof (f_ohdr); | 321 | f_thdr.s_scnptr = sizeof (f_hdr) + sizeof (f_ohdr); |
| 388 | f_thdr.s_scnptr += (f_hdr.f_nscns) * (sizeof (f_thdr)); | 322 | f_thdr.s_scnptr += (f_hdr.f_nscns) * (sizeof (f_thdr)); |
| 389 | lnnoptr = f_thdr.s_lnnoptr; | 323 | lnnoptr = f_thdr.s_lnnoptr; |
| 390 | #ifdef SECTION_ALIGNMENT | ||
| 391 | /* Some systems require special alignment | ||
| 392 | of the sections in the file itself. */ | ||
| 393 | f_thdr.s_scnptr | ||
| 394 | = (f_thdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT; | ||
| 395 | #endif /* SECTION_ALIGNMENT */ | ||
| 396 | text_scnptr = f_thdr.s_scnptr; | 324 | text_scnptr = f_thdr.s_scnptr; |
| 397 | f_dhdr.s_paddr = f_ohdr.data_start; | 325 | f_dhdr.s_paddr = f_ohdr.data_start; |
| 398 | f_dhdr.s_vaddr = f_ohdr.data_start; | 326 | f_dhdr.s_vaddr = f_ohdr.data_start; |
| 399 | f_dhdr.s_size = f_ohdr.dsize; | 327 | f_dhdr.s_size = f_ohdr.dsize; |
| 400 | f_dhdr.s_scnptr = f_thdr.s_scnptr + f_thdr.s_size; | 328 | f_dhdr.s_scnptr = f_thdr.s_scnptr + f_thdr.s_size; |
| 401 | #ifdef SECTION_ALIGNMENT | ||
| 402 | /* Some systems require special alignment | ||
| 403 | of the sections in the file itself. */ | ||
| 404 | f_dhdr.s_scnptr | ||
| 405 | = (f_dhdr.s_scnptr + SECTION_ALIGNMENT) & ~SECTION_ALIGNMENT; | ||
| 406 | #endif /* SECTION_ALIGNMENT */ | ||
| 407 | #ifdef DATA_SECTION_ALIGNMENT | ||
| 408 | /* Some systems require special alignment | ||
| 409 | of the data section only. */ | ||
| 410 | f_dhdr.s_scnptr | ||
| 411 | = (f_dhdr.s_scnptr + DATA_SECTION_ALIGNMENT) & ~DATA_SECTION_ALIGNMENT; | ||
| 412 | #endif /* DATA_SECTION_ALIGNMENT */ | ||
| 413 | data_scnptr = f_dhdr.s_scnptr; | 329 | data_scnptr = f_dhdr.s_scnptr; |
| 414 | f_bhdr.s_paddr = f_ohdr.data_start + f_ohdr.dsize; | 330 | f_bhdr.s_paddr = f_ohdr.data_start + f_ohdr.dsize; |
| 415 | f_bhdr.s_vaddr = f_ohdr.data_start + f_ohdr.dsize; | 331 | 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) | |||
| 427 | f_thdr.s_lnnoptr += bias; | 343 | f_thdr.s_lnnoptr += bias; |
| 428 | } | 344 | } |
| 429 | 345 | ||
| 430 | #ifdef ADJUST_EXEC_HEADER | ||
| 431 | ADJUST_EXEC_HEADER; | ||
| 432 | #endif /* ADJUST_EXEC_HEADER */ | ||
| 433 | |||
| 434 | if (write (new, &f_hdr, sizeof (f_hdr)) != sizeof (f_hdr)) | 346 | if (write (new, &f_hdr, sizeof (f_hdr)) != sizeof (f_hdr)) |
| 435 | { | 347 | { |
| 436 | PERROR (new_name); | 348 | PERROR (new_name); |