aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-08-19 16:53:35 +0000
committerRichard M. Stallman1996-08-19 16:53:35 +0000
commit7d7134484ace48209757c4df34685e684a94a408 (patch)
tree21be42765c9968972b3eafb6173d2dca0f905062 /src
parent3c5ddb48c40fcf125d5b42932fb7cf2453314595 (diff)
downloademacs-7d7134484ace48209757c4df34685e684a94a408.tar.gz
emacs-7d7134484ace48209757c4df34685e684a94a408.zip
(unexec): Copy the .got section.
Diffstat (limited to 'src')
-rw-r--r--src/unexalpha.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/unexalpha.c b/src/unexalpha.c
index 2bbffde05ab..48b4059fcaf 100644
--- a/src/unexalpha.c
+++ b/src/unexalpha.c
@@ -266,6 +266,8 @@ unexec (new_name, a_name, data_start, bss_start, entry_address)
266#ifdef _GOT 266#ifdef _GOT
267 if (got_section != NULL) 267 if (got_section != NULL)
268 { 268 {
269 bcopy (got_section, buffer, sizeof (struct scnhdr));
270
269 got_section->s_vaddr = vaddr; 271 got_section->s_vaddr = vaddr;
270 got_section->s_paddr = vaddr; 272 got_section->s_paddr = vaddr;
271 got_section->s_size = 0; 273 got_section->s_size = 0;
@@ -292,6 +294,21 @@ unexec (new_name, a_name, data_start, bss_start, entry_address)
292 WRITE (new, (char *)DATA_START, nhdr.aout.dsize, 294 WRITE (new, (char *)DATA_START, nhdr.aout.dsize,
293 "writing data section to %s", new_name); 295 "writing data section to %s", new_name);
294 296
297#ifdef _GOT
298#define old_got_section ((struct scnhdr *)buffer)
299
300 if (got_section != NULL)
301 {
302 SEEK (new, old_got_section->s_scnptr,
303 "seeking to start of got_section in %s", new_name);
304 WRITE (new, oldptr + old_got_section->s_scnptr, old_got_section->s_size,
305 "writing new got_section of %s", new_name);
306 SEEK (new, nhdr.aout.tsize + nhdr.aout.dsize,
307 "seeking to end of data section of %s", new_name);
308 }
309
310#undef old_got_section
311#endif
295 312
296 /* 313 /*
297 * Construct new symbol table header 314 * Construct new symbol table header