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

H. J. Lu hjl@lucon.org
Mon Apr 18 13:47:00 GMT 2005


On Mon, Apr 18, 2005 at 09:57:19AM +0200, Jan Beulich wrote:
> >>> Alan Modra <amodra@bigpond.net.au> 18.04.05 01:34:05 >>>
> >The struct test is using a .short, which looks like a data allocation
> >pseudo-op to me.  If .short should have different alignment when you
> >happen to use it in the absolute section, then md_cons_align should
> >reflect that fact.
> 
> I agree to this; therefore I'd suggest the below adjustment to the test.
> 
> Jan
> 
> gas/testsuite/
> 2005-04-15  Jan Beulich  <jbeulich@novell.com>
> 
> 	* gas/elf/struct.s: Adjust to not get into alignment issues.
> 	* gas/elf/struct.d: Adjust for the above and the test's name.
> 

You are assuming .short will be aligned at 2. The example in document
has

            .struct 0
     field1:
             .struct field1 + 4
     field2:
             .struct field2 + 4
     field3:


H.J.



More information about the Binutils mailing list