comparison src/unexelf.c @ 31331:c0ff788ed359

(SHT_PROGBITS) [__NetBSD__ && !PT_LOAD]: Don't define. (SHT_MIPS_DEBUG, HDRR) [__NetBSD__ && __mips__]: Define.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 02 Sep 2000 11:34:13 +0000
parents da0b1ef29e28
children 9af879dacd99
comparison
equal deleted inserted replaced
31330:40ff2fc1d123 31331:c0ff788ed359
477 # endif 477 # endif
478 # include <sys/exec_elf.h> 478 # include <sys/exec_elf.h>
479 479
480 # ifndef PT_LOAD 480 # ifndef PT_LOAD
481 # define PT_LOAD Elf_pt_load 481 # define PT_LOAD Elf_pt_load
482 # if 0 /* was in pkgsrc patches for 20.7 */
483 # define SHT_PROGBITS Elf_sht_progbits
484 # endif
482 # define SHT_SYMTAB Elf_sht_symtab 485 # define SHT_SYMTAB Elf_sht_symtab
483 # define SHT_DYNSYM Elf_sht_dynsym 486 # define SHT_DYNSYM Elf_sht_dynsym
484 # define SHT_NULL Elf_sht_null 487 # define SHT_NULL Elf_sht_null
485 # define SHT_NOBITS Elf_sht_nobits 488 # define SHT_NOBITS Elf_sht_nobits
486 # define SHT_REL Elf_sht_rel 489 # define SHT_REL Elf_sht_rel
487 # define SHT_RELA Elf_sht_rela 490 # define SHT_RELA Elf_sht_rela
488 491
489 # define SHN_UNDEF Elf_eshn_undefined 492 # define SHN_UNDEF Elf_eshn_undefined
490 # define SHN_ABS Elf_eshn_absolute 493 # define SHN_ABS Elf_eshn_absolute
491 # define SHN_COMMON Elf_eshn_common 494 # define SHN_COMMON Elf_eshn_common
492 # endif 495 # endif /* !PT_LOAD */
493 496
494 # ifdef __alpha__ 497 # ifdef __alpha__
495 # include <sys/exec_ecoff.h> 498 # include <sys/exec_ecoff.h>
496 # define HDRR struct ecoff_symhdr 499 # define HDRR struct ecoff_symhdr
497 # define pHDRR HDRR * 500 # define pHDRR HDRR *
498 # endif 501 # endif /* __alpha__ */
499 #endif /* __NetBSD__ */ 502 #endif /* __NetBSD__ */
503
504 #ifdef __mips__ /* was in pkgsrc patches for 20.7 */
505 # define SHT_MIPS_DEBUG DT_MIPS_FLAGS
506 # define HDRR struct Elf_Shdr
507 #endif /* __mips__ */
500 508
501 #ifdef __OpenBSD__ 509 #ifdef __OpenBSD__
502 # include <sys/exec_elf.h> 510 # include <sys/exec_elf.h>
503 #endif 511 #endif
504 512
611 if (idx == old_file_h->e_shnum) 619 if (idx == old_file_h->e_shnum)
612 { 620 {
613 if (noerror) 621 if (noerror)
614 return -1; 622 return -1;
615 else 623 else
616 fatal ("Can't find %s in %s.\n", name, file_name, 0); 624 fatal ("Can't find %s in %s.\n", name, file_name);
617 } 625 }
618 626
619 return idx; 627 return idx;
620 } 628 }
621 629