Subject: Re: Shared library support for ARM ELF
To: Ben Harris <bjh21@netbsd.org>
From: Matt Thomas <matt@3am-software.com>
List: port-arm
Date: 07/21/2001 22:50:44
At 11:20 AM 7/20/2001 +0100, Ben Harris wrote:
>MASK_RETURN_ADDR needs to be changed to generate code to check what mode
>the CPU is in at run-time and pick the correct mask appropriately.
>sys/arch/arm/include/profile.h demonstrates how to do this, but it needs
>to be converted to a form GCC can understand.

Is there any reason why this has to be done dynamically?  Why can't crt0.o
calculate the mask and store it somewhere so that gcc generated code can
reference it?  (But that gets nasty for PIC code.)  The other alternative
it to use an UNSPEC rtx to calculate and put a matching pattern in arm.md.
But I haven't quite figured out UNSPEC rtx's.

--
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message