diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-09-23 19:19:41 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-09-23 19:19:41 +0000 |
commit | 57b400818d0793d8bd7df95143fc1432953d43a4 (patch) | |
tree | d732ef78fa3eca21143ab025c19db2450fdf3053 /bfd | |
parent | a67d9a42cc378bebc1ec1ebda4b1641907050f0e (diff) | |
download | gdb-57b400818d0793d8bd7df95143fc1432953d43a4.zip gdb-57b400818d0793d8bd7df95143fc1432953d43a4.tar.gz gdb-57b400818d0793d8bd7df95143fc1432953d43a4.tar.bz2 |
* elfcode.h (map_program_segments): Don't abort if we allocated
too much space for the program header, only if we allocated too
little.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 11 | ||||
-rw-r--r-- | bfd/elfcode.h | 10 |
2 files changed, 15 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4089456..5fa7daf 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +Fri Sep 23 15:15:31 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * elfcode.h (map_program_segments): Don't abort if we allocated + too much space for the program header, only if we allocated too + little. + Tue Sep 20 13:17:07 1994 J.T. Conklin (jtc@phishhead.cygnus.com) * libaout.h: Fix comment. @@ -6,6 +12,11 @@ Tue Sep 20 13:17:07 1994 J.T. Conklin (jtc@phishhead.cygnus.com) Tue Sep 20 15:23:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + * Makefile.in: Rebuilt dependencies. + (BFD32_BACKENDS): Add sparcnetbsd.o. + (CFILES): Add ns32knetbsd.c and sparcnetbsd.c. + * targets.c: ns32knetbsd_vec was renamed to pc532netbsd_vec. + * coff-sh.c (rtype2howto): Remove; unused. (coff_sh_relocate_section): Remove unused local variable rstat. (reloc_processing): Comment out; unused. diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 2ba4856..60e8957 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -1924,8 +1924,9 @@ map_program_segments (abfd, off, first, phdr_size) } /* Make sure the return value from get_program_header_size matches - what we computed here. */ - if (phdr_count != phdr_size / sizeof (Elf_External_Phdr)) + what we computed here. Actually, it's OK if we allocated too + much space in the program header. */ + if (phdr_count > phdr_size / sizeof (Elf_External_Phdr)) abort (); /* Set up program header information. */ @@ -5855,10 +5856,7 @@ elf_link_output_extsym (h, data) sym.st_size = h->size; sym.st_other = 0; if (h->root.type == bfd_link_hash_weak - || ((h->elf_link_hash_flags & ELF_LINK_HASH_DEFINED_WEAK) != 0 - && ((h->elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR - | ELF_LINK_HASH_REF_DYNAMIC)) - == 0))) + || (h->elf_link_hash_flags & ELF_LINK_HASH_DEFINED_WEAK) != 0) sym.st_info = ELF_ST_INFO (STB_WEAK, h->type); else sym.st_info = ELF_ST_INFO (STB_GLOBAL, h->type); |