sh-elf Assembler doesn't give warning for misaligned data
Nick Clifton
nickc@redhat.com
Wed Nov 26 17:37:00 GMT 2003
More information about the Binutils mailing list
Wed Nov 26 17:37:00 GMT 2003
- Previous message (by thread): sh-elf Assembler doesn't give warning for misaligned data
- Next message (by thread): sh-elf Assembler doesn't give warning for misaligned data
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Nutan,
> For code below, the sh-elf assembler doesn't give warning about
> misaligned data for "foo".
>
> .section .text
> mov.l foo, r0
> bar:
> .byte 1
> foo:
> .long 0x12345678
> The sh-coff assembler does give the warning.
Please try the attached patch and let me know if it gives you any
problems.
Cheers
Nick
2003-11-26 Nick Clifton <nickc@redhat.com>
* config/tc-sh.c (sh_elf_cons): If md_cons_align is defined
call it to make sure that the constants that are going to be
emitted are correctly aligned.
Index: gas/config/tc-sh.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.88
diff -c -3 -p -r1.88 tc-sh.c
*** gas/config/tc-sh.c 22 Nov 2003 02:35:31 -0000 1.88
--- gas/config/tc-sh.c 26 Nov 2003 17:33:48 -0000
*************** sh_elf_cons (register int nbytes)
*** 801,806 ****
--- 801,810 ----
return;
}
+ #ifdef md_cons_align
+ md_cons_align (nbytes);
+ #endif
+
do
{
expression (&exp);
- Previous message (by thread): sh-elf Assembler doesn't give warning for misaligned data
- Next message (by thread): sh-elf Assembler doesn't give warning for misaligned data
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list