This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ARM/thumb interworking confuses unwinder
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: binutils at sourceware dot org
- Cc: Christophe LYON <christophe dot lyon at st dot com>
- Date: Thu, 24 Jul 2008 03:29:09 +0100
- Subject: Re: ARM/thumb interworking confuses unwinder
- Openpgp: id=A5FB74E6
- References: <4887E088.3050401@eCosCentric.com>
Jonathan Larmour wrote:
> In CVS,
> the choice of stub is decided in arm_type_of_stub(), called from
> elf32_arm_size_stubs() which is called in ld's emultempl/armelf.em in
> "gld${EMULATION_NAME}_finish". It does not try and deal with a simple stub
> in that code, but then as a result identifies a long call stub instead -
> perhaps it was thinking that other code would fix it up?
Just to be specific about this, the reloc is R_ARM_THM_CALL and in this
test in elf32_arm_size_stubs():
if (r_type == R_ARM_THM_CALL)
{
if ((!thumb2
&& (branch_offset > THM_MAX_FWD_BRANCH_OFFSET
|| (branch_offset < THM_MAX_BWD_BRANCH_OFFSET)))
|| (thumb2
&& (branch_offset > THM2_MAX_FWD_BRANCH_OFFSET
|| (branch_offset < THM2_MAX_BWD_BRANCH_OFFSET)))
|| ((st_type != STT_ARM_TFUNC) && !globals->use_blx))
{
it matches ((st_type != STT_ARM_TFUNC) && !globals->use_blx)) since it's
arm9 and thus armv4t. This test doesn't seem right - although I've tried
simply removing it, and then no stub is generated at all. (since stub_type
== arm_stub_none).
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine