This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Oops, the problem remains even with binutils 2.11.90.0.5 ! [Re: ld sig11 while compiling asmutils-0.14 on RedHat-7.1]


On Thu, Apr 26, 2001 at 11:40:33AM +0400, dmitry.antipov@auriga.ru wrote:
> 
> As I see, this patch is already included into nasm-0.98-6 RPM comes with
> RedHat 7.1.
> But this problem with ld still remains even with binutils 2.11.90.0.5 !
> 

Here is a new nasm patch which replaces my previous nasm patch.


H.J.
----
--- nasm-0.98/outelf.c.boguself	Thu Jun  3 13:24:43 1999
+++ nasm-0.98/outelf.c	Thu Apr 26 11:53:44 2001
@@ -922,13 +922,13 @@ static struct SAA *elf_build_symtab (lon
      * Now some standard symbols defining the segments, for relocation
      * purposes.
      */
-    for (i = 1; i <= nsects+1; i++) {
+    for (i = 1; i <= nsects; i++) {
 	p = entry;
 	WRITELONG (p, 0);	       /* no symbol name */
 	WRITELONG (p, 0);	       /* offset zero */
 	WRITELONG (p, 0);	       /* size zero */
 	WRITESHORT (p, 3);	       /* local section-type thing */
-	WRITESHORT (p, (i==1 ? SHN_ABS : i-1));   /* the section id */
+	WRITESHORT (p, i);             /* the section id */
 	saa_wbytes (s, entry, 16L);
 	*len += 16;
 	(*local)++;
@@ -986,7 +986,7 @@ static struct SAA *elf_build_reltab (lon
 	long sym = r->symbol;
 
 	if (sym >= GLOBAL_TEMP_BASE)
-	    sym += -GLOBAL_TEMP_BASE + (nsects+3) + nlocals;
+	    sym += -GLOBAL_TEMP_BASE + (nsects+2) + nlocals;
 
 	p = entry;
 	WRITELONG (p, r->address);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]