Subject: Re: Shared library support for ARM ELF
To: Todd Vierling <>
From: Richard Earnshaw <>
List: port-arm
Date: 07/20/2001 17:42:10
> : No, the only time it's needed is when we need to examine the return
> : address in "C" code.  At run time the architecture just gets extracting
> : the return bits right.  C code unpicking the stack however, has to throw
> : away the bits that don't count.  In practise this will only occur when
> : unwinding an exception.
> OK, that makes sense.  (Trampolines also come to mind, but I'm unsure as to
> whether arm uses them extensively.)

Even trampolines don't need to worry about this.  The act of moving the 
return value into the pc will throw away the unwanted bits (unless you use 
the movs instruction or ldm...^ equivalent, which is what we won't be 
doing).  So we only need to mask the value if passing it back to the 
programmer in some way.  __builtin_return_addr(0) is one way (we don't 
support other values to this function on the arm); exception unwinding is 
another.  Neither of these are common, so the hit on performance is