[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ARM/Thumb long calls stubs
From: |
OMakarenko |
Subject: |
ARM/Thumb long calls stubs |
Date: |
Tue, 30 Apr 2002 12:20:18 +0400 |
The following examples doesn't work with 2.12 binutils:
>>>example1:
Thumb_func1(void)
{
}
Thumb_func2(void)
{
Thumb_func1();
}
if the distance between func1 and func2 is happen to be more then 4M this
code fails.
Compiler generates:
BL Thumb_func1
to call Thumb_func1 and linker doesn't see that it can not get to
Thumb_func1 with simple BL (it can only address +-4M in thumb mode)
It should generate some stub to call Thumb_func1 using register, shouldn't
it? Or it should report an error at least.
>>>example2, compiled with interwork
ARM_func(void)
{
}
Thumb_func(void)
{
ARM_func();
}
Linker correctly adds interwrork stub but if the stub itself is too far from
Thumb_func() it fails to add long call stub again.
Does ld is supposed to support long calls stubs or not?
Are there any known workarounds?
=oleg
There are nine and sixty ways of constructing tribal lays, and every single
one of them is right...
- ARM/Thumb long calls stubs,
OMakarenko <=