This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM ABI calling conventions


Mark Wielaard wrote:
Hi,

I need some help with ARM calling conventions. While cleaning up some
arm support code (I am now able to get nice backtraces across
modules/kernel boundaries using the dwarf unwinder, whoho!), I noticed
the following failures:

Running /root/systemtap/testsuite/systemtap.context/context.exp ...
FAIL: int64 function arguments -- numeric
FAIL: int64 function arguments -- numeric --kelf --ignore-dwarf

Which is now http://sourceware.org/bugzilla/show_bug.cgi?id=13466

The problem is that I don't fully understand which ABI calling
conventions are in used on the various ARM distros. Nor do I understand
how to detect which one is being used. Can the ABI calling conventions
be different between kernel and user space?

Yes, in theory the ABI calling conventions can differ between kernel and user space as well as between individual user space binaries.


There are a few ways to detect the ABI option used in a particular binary. See http://wiki.debian.org/ArmEabiPort .


Fedora15 ARM HardFP port [*] uses EABI (though it isn't officially called EABI anymore). That is what I am using on a little trimslice now. But apparently older Fedora ports also used EABI (at least for the integral argument passing, floating point argument passing is a different story).

What tapsets/arm/register.stp seems to support is the ARM OABI.
Are there still distros that use that one?


I expect most distributions have switched to EABI by now, though it wouldn't surprise me if there was some legacy code running somewhere that uses OABI.


Would it be possible to support both ABIs, parsing the ELF header to obtain the flag and then take the appropriate action?

-Wade

Thanks,

Mark

[*]
https://fedoraproject.org/wiki/Architectures/ARM/Fedora15_HardFP_Bootstrap
which uses the calling convention described in the AAPCS
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]