This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] ELF: make .struct interact with .previous
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: amodra at bigpond dot net dot au, nickc at redhat dot com,binutils at sources dot redhat dot com, wilson at specifixinc dot com
- Date: Mon, 18 Apr 2005 06:47:06 -0700
- Subject: Re: [PATCH] ELF: make .struct interact with .previous
- References: <s2637663.086@emea1-mh.id2.novell.com>
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.