From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@nynexst.com (H.J. Lu) To: ian@sanguine.cygnus.com Cc: gas2@cygnus.com Subject: Typo in Fri Sep 23 15:15:31 1994 changes for elfcode.h Date: Sun, 25 Sep 1994 17:37:00 -0000 Message-id: <9409260036.AA07497@titanic.nynexst.com> X-SW-Source: 1994/msg00110.html 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. */