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]
Other format: [Raw text]

Re: [PATCH] ELF: make .struct interact with .previous


On Fri, Apr 15, 2005 at 10:31:12AM -0700, H. J. Lu wrote:
> On Fri, Apr 15, 2005 at 11:51:11AM +0100, Nick Clifton wrote:
> > Hi Jan,
> > 
> > >gas/
> > >2005-04-13  Jan Beulich  <jbeulich@novell.com>
> > >
> > >	* config/obj-elf.c (obj_elf_struct): New.
> > >	(elf_pseudo_table). Use it for .offset and .struct.
> > >
> > >gas/testsuite/
> > >2005-04-13  Jan Beulich  <jbeulich@novell.com>
> > >
> > >	* gas/elf/struct.[sd]: New.
> > >	* gas/elf/elf.exp: Run new test.
> > 
> > Approved - please apply.
> > 
> 
> This test failed on Linux/ia64:
> 
> /net/gnu/export/linux/src/binutils/binutils/gas/testsuite/lib/run
> ../as-new   -o dump.o
> /net/gnu/export/linux/src/binutils/binutils/gas/testsuite/gas/elf/struct.s
> /export/build/linux/binutils-debug/build-ia64-linux/gas/testsuite/../../binutils/nm-new
> --extern-only dump.o > dump.out
> regexp_diff match failure
> regexp "^0+3 A w2$"
> line   "0000000000000004 A w2"
> regexp_diff match failure
> regexp "^0+5 A w3$" line   "0000000000000006 A w3"
> FAIL: struct
> 

I don't think we should call md_cons_align for ABS section. This patch
fixes the failure.


H.J.
----
2005-04-15  H.J. Lu  <hongjiu.lu@intel.com>

	* read.c (cons_worker): Don't call md_cons_align for ABS
	section.

--- gas/read.c.abs	2005-04-11 08:54:47.000000000 -0700
+++ gas/read.c	2005-04-15 11:30:32.000000000 -0700
@@ -3411,7 +3411,8 @@ cons_worker (register int nbytes,	/* 1=.
 #endif
 
 #ifdef md_cons_align
-  md_cons_align (nbytes);
+  if (now_seg != absolute_section)
+    md_cons_align (nbytes);
 #endif
 
   c = 0;


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