This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: GNU as problem for aix4.3
- From: "Thibaud Tortech" <tortech at nortelnetworks dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 06 Feb 2003 16:52:22 +0100
- Subject: Re: GNU as problem for aix4.3
- Organization: Nortel Networks
- References: <200302060513.h165DUk24196@greed.delorie.com>
I tried the patch and it works.
The object file generated is bigger than the previous one.
Objdump shows:
Disassembly of section .data:
000000000000002c <TOC>:
2c: 41 00 00 00 bc 8,0,2c <TOC>
000000000000002d <f>:
2d: 00 00 00 00 .long 0x0
0000000000000030 <f>:
30: 00 00 00 00 .long 0x0
34: 00 00 00 2c .long 0x2c
38: 00 00 00 00 .long 0x0
000000000000003c <fp>:
3c: 00 00 00 30 .long 0x30
40: 00 00 00 00 .long 0x0
44: 00 00 00 2c .long 0x2c
48: 00 00 00 00 .long 0x0
fp seems to have addition zeros.
So I changed your patch a little bit by putting it in the following
condition statement:
if( symbol_get_tc (sym)->class == XMC_DS )
frag_align (symbol_get_tc (sym)->align, 0, 0);
And I obtained the following objdump output:
Disassembly of section .data:
000000000000002c <TOC>:
2c: 41 00 00 00 bc 8,0,2c <TOC>
000000000000002d <f>:
2d: 00 00 00 00 .long 0x0
0000000000000030 <f>:
30: 00 00 00 00 .long 0x0
34: 00 00 00 2c .long 0x2c
38: 00 00 00 00 .long 0x0
000000000000003c <fp>:
3c: 00 00 00 30 .long 0x30
40: 00 00 00 2c .long 0x2c
I don't know if it's correct but it seems to work.
The only thing is that the symbol f is defined twice in the data
section.
Thanks for your help.
Thibaud Tortech
DJ Delorie wrote:
> Try this patch:
>
> 2003-02-06 DJ Delorie <dj@redhat.com>
>
> * config/tc-ppc.c (ppc_csect): Make sure alignment is
> enforced.
>
> Index: gas/config/tc-ppc.c
> ===================================================================
> RCS file: /cvs/uberbaum/gas/config/tc-ppc.c,v
> retrieving revision 1.66
> diff -p -2 -r1.66 gas/config/tc-ppc.c
> *** gas/config/tc-ppc.c 6 Feb 2003 01:24:17 -0000 1.66
> --- gas/config/tc-ppc.c 6 Feb 2003 05:09:03 -0000
> *************** ppc_csect (ignore)
> *** 3023,3026 ****
> --- 3023,3028 ----
> }
>
> + frag_align (symbol_get_tc (sym)->align, 0, 0);
> +
> demand_empty_rest_of_line ();
> }