This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi, -- H.J. Lu NYNEX Science and Technology, Inc. hjl@nynexst.com --- 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. (assign_file_positions_except_relocs): Similar change. diff -u -r --new-file --show-function-line=^[A-Za-z_] /cygint/s1/users/raeburn/offsite/snap/old/gas-940923/bfd/elfcode.h ./bfd/elfcode.h --- /cygint/s1/users/raeburn/offsite/snap/old/gas-940923/bfd/elfcode.h Wed Sep 14 12:08:35 1994 +++ ./bfd/elfcode.h Fri Sep 23 12:53:51 1994 @@ -1924,8 +1924,9 @@ map_program_segments (abfd, off, first, } /* 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. */ @@ -2102,7 +2103,7 @@ assign_file_positions_except_relocs (abf phdr_map = map_program_segments (abfd, phdr_off, first, phdr_size); if (phdr_map == (file_ptr) -1) return false; - BFD_ASSERT (phdr_map == phdr_off + phdr_size); + BFD_ASSERT (phdr_map < phdr_off + phdr_size); ^^^ Should that be + BFD_ASSERT (phdr_map <= phdr_off + phdr_size); } /* Place the section headers. */