comparison src/unexelf.c @ 6052:cff556bf85e8

(ELF_BSS_SECTION_NAME): New macro (config.h may override). (unexec): Use it.
author Richard M. Stallman <rms@gnu.org>
date Thu, 24 Feb 1994 05:40:30 +0000
parents 348f6a32d9b5
children dd787a5353d1
comparison
equal deleted inserted replaced
6051:0b144d967f30 6052:cff556bf85e8
424 #define fatal(a, b, c) fprintf (stderr, a, b, c), exit (1) 424 #define fatal(a, b, c) fprintf (stderr, a, b, c), exit (1)
425 #else 425 #else
426 extern void fatal (char *, ...); 426 extern void fatal (char *, ...);
427 #endif 427 #endif
428 428
429 #ifndef ELF_BSS_SECTION_NAME
430 #define ELF_BSS_SECTION_NAME ".bss"
431 #endif
432
429 /* Get the address of a particular section or program header entry, 433 /* Get the address of a particular section or program header entry,
430 * accounting for the size of the entries. 434 * accounting for the size of the entries.
431 */ 435 */
432 436
433 #define OLD_SECTION_H(n) \ 437 #define OLD_SECTION_H(n) \
533 #ifdef DEBUG 537 #ifdef DEBUG
534 fprintf (stderr, "Looking for .bss - found %s\n", 538 fprintf (stderr, "Looking for .bss - found %s\n",
535 old_section_names + OLD_SECTION_H (old_bss_index).sh_name); 539 old_section_names + OLD_SECTION_H (old_bss_index).sh_name);
536 #endif 540 #endif
537 if (!strcmp (old_section_names + OLD_SECTION_H (old_bss_index).sh_name, 541 if (!strcmp (old_section_names + OLD_SECTION_H (old_bss_index).sh_name,
538 ".bss")) 542 ELF_BSS_SECTION_NAME))
539 break; 543 break;
540 } 544 }
541 if (old_bss_index == old_file_h->e_shnum) 545 if (old_bss_index == old_file_h->e_shnum)
542 fatal ("Can't find .bss in %s.\n", old_name, 0); 546 fatal ("Can't find .bss in %s.\n", old_name, 0);
543 547