aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-10-30 02:34:12 +0000
committerRichard M. Stallman1995-10-30 02:34:12 +0000
commitac5e49e926e846aa6aa67e351016b40f4f56569f (patch)
tree9113b4ba6ba051030b30da4eb95db1cd58cdb3bd /src
parent782dad449abb84e3a0cca6476be428efa3d6f893 (diff)
downloademacs-ac5e49e926e846aa6aa67e351016b40f4f56569f.tar.gz
emacs-ac5e49e926e846aa6aa67e351016b40f4f56569f.zip
(find_section): New arg old_section_h.
Rename file_h to old_file_h and fix type. Calls changed.
Diffstat (limited to 'src')
-rw-r--r--src/unexsgi.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/unexsgi.c b/src/unexsgi.c
index 073819afdd5..a79fb94e81c 100644
--- a/src/unexsgi.c
+++ b/src/unexsgi.c
@@ -466,16 +466,17 @@ round_up (x, y)
466 if NOERROR is 0; we return -1 if NOERROR is nonzero. */ 466 if NOERROR is 0; we return -1 if NOERROR is nonzero. */
467 467
468static int 468static int
469find_section (name, section_names, file_name, file_h, noerror) 469find_section (name, section_names, file_name, old_file_h, old_section_h, noerror)
470 char *name; 470 char *name;
471 char *section_names; 471 char *section_names;
472 char *file_name; 472 char *file_name;
473 Elf32_Ehdr file_h; 473 Elf32_Ehdr *old_file_h;
474 Elf32_Shdr *old_section_h;
474 int noerror; 475 int noerror;
475{ 476{
476 int idx; 477 int idx;
477 478
478 for (idx = 1; idx < file_h->e_shnum; idx++) 479 for (idx = 1; idx < old_file_h->e_shnum; idx++)
479 { 480 {
480#ifdef DEBUG 481#ifdef DEBUG
481 fprintf (stderr, "Looking for %s - found %s\n", name, 482 fprintf (stderr, "Looking for %s - found %s\n", name,
@@ -485,7 +486,7 @@ find_section (name, section_names, file_name, file_h, noerror)
485 name)) 486 name))
486 break; 487 break;
487 } 488 }
488 if (idx == file_h->e_shnum) 489 if (idx == old_file_h->e_shnum)
489 { 490 {
490 if (noerror) 491 if (noerror)
491 return -1; 492 return -1;
@@ -566,18 +567,18 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
566 /* Find the mdebug section, if any. */ 567 /* Find the mdebug section, if any. */
567 568
568 old_mdebug_index = find_section (".mdebug", old_section_names, 569 old_mdebug_index = find_section (".mdebug", old_section_names,
569 old_name, old_file_h, 1); 570 old_name, old_file_h, old_section_h, 1);
570 571
571 /* Find the old .bss section. */ 572 /* Find the old .bss section. */
572 573
573 old_bss_index = find_section (".bss", old_section_names, 574 old_bss_index = find_section (".bss", old_section_names,
574 old_name, old_file_h, 0); 575 old_name, old_file_h, old_section_h, 0);
575 576
576 /* Find the old .data section. Figure out parameters of 577 /* Find the old .data section. Figure out parameters of
577 the new data2 and bss sections. */ 578 the new data2 and bss sections. */
578 579
579 old_data_index = find_section (".data", old_section_names, 580 old_data_index = find_section (".data", old_section_names,
580 old_name, old_file_h, 0); 581 old_name, old_file_h, old_section_h, 0);
581 582
582 old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr; 583 old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr;
583 old_bss_size = OLD_SECTION_H (old_bss_index).sh_size; 584 old_bss_size = OLD_SECTION_H (old_bss_index).sh_size;