public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* Typo in Fri Sep 23 15:15:31 1994 changes for elfcode.h
@ 1994-09-25 17:37 H.J. Lu
  1994-09-25 19:49 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: H.J. Lu @ 1994-09-25 17:37 UTC (permalink / raw)
  To: ian; +Cc: gas2

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.  */


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Typo in Fri Sep 23 15:15:31 1994 changes for elfcode.h
  1994-09-25 17:37 Typo in Fri Sep 23 15:15:31 1994 changes for elfcode.h H.J. Lu
@ 1994-09-25 19:49 ` Ian Lance Taylor
  1994-09-25 20:05   ` H.J. Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 1994-09-25 19:49 UTC (permalink / raw)
  To: hjl; +Cc: gas2

   From: hjl@nynexst.com (H.J. Lu)
   Date: Sun, 25 Sep 94 20:37:23 EDT

   -      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);


Yes, it certainly should.  I checked that in for somebody in a hurry
before leaving for the weekend--I should have known better.  Every
time you think you don't need to test something, you get nailed.

Ian


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Typo in Fri Sep 23 15:15:31 1994 changes for elfcode.h
  1994-09-25 19:49 ` Ian Lance Taylor
@ 1994-09-25 20:05   ` H.J. Lu
  1994-09-25 23:25     ` Ken Raeburn
  0 siblings, 1 reply; 4+ messages in thread
From: H.J. Lu @ 1994-09-25 20:05 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gas2

> 
>    From: hjl@nynexst.com (H.J. Lu)
>    Date: Sun, 25 Sep 94 20:37:23 EDT
> 
>    -      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);
> 
> 
> Yes, it certainly should.  I checked that in for somebody in a hurry
> before leaving for the weekend--I should have known better.  Every
> time you think you don't need to test something, you get nailed.
> 

Thanks. I have two quick questions:

1. When will gas work with PIC? I don't think the current one works.
   I had to apply Eric's patches to gas-940912 and the PIC codes
   in the current one cannnot handle the gcc -fPIC output.
2. Should ld -N work on ELF? Has anyone tried it?


-- 
H.J. Lu
NYNEX Science and Technology, Inc.			hjl@nynexst.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Typo in Fri Sep 23 15:15:31 1994 changes for elfcode.h
  1994-09-25 20:05   ` H.J. Lu
@ 1994-09-25 23:25     ` Ken Raeburn
  0 siblings, 0 replies; 4+ messages in thread
From: Ken Raeburn @ 1994-09-25 23:25 UTC (permalink / raw)
  To: H.J. Lu; +Cc: gas2

   1. When will gas work with PIC? I don't think the current one works.
      I had to apply Eric's patches to gas-940912 and the PIC codes
      in the current one cannnot handle the gcc -fPIC output.

I'll be working on it again after I get a couple of Cygnus customer
bug report out of the way.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1994-09-25 23:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-09-25 17:37 Typo in Fri Sep 23 15:15:31 1994 changes for elfcode.h H.J. Lu
1994-09-25 19:49 ` Ian Lance Taylor
1994-09-25 20:05   ` H.J. Lu
1994-09-25 23:25     ` Ken Raeburn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).