[PATCH,Testsuite] Add .align 2 for labels on Thumb
Mark Kettenis
mark.kettenis@xs4all.nl
Thu Aug 12 09:38:00 GMT 2010
> Date: Thu, 12 Aug 2010 16:18:14 +0800
> From: Yao Qi <yao@codesourcery.com>
> Content-Disposition: inline
>
> We find test failures in gdb.dwarf2/dw2-ref-missing-frame.exp when
> test cases are compiled as thumb.
> https://bugs.launchpad.net/gdb-linaro/+bug/615997
>
> In dw2-ref-missing-frame-func.c, it is assumed that address of label
> 'func_loopfb_start' is equal to address of function func_loopfb.
> However, in thumb, the label is 16-bit aligned, while function is
> 32-bit aligned, so label address may not be equal to function address.
>
> Patch below is to set labels 32-bit aligned. Tested this patch on
> both x86 and armel. OK to apply?
Unfortunately not. The .align pseudo-op has different effects on
different architectures. On most architectures .align 2 actually
means 16-bit alignment, which is certainly not what you want on RISC
architectures that have 32-bit wide instructions.
More information about the Gdb-patches
mailing list