2008-11-20 12:58:55     Why don't apps need -mlong-calls?

Document created by Aaronwu Employee on Aug 8, 2013
Version 1Show Document
  • View in full screen mode

2008-11-20 12:58:55     Why don't apps need -mlong-calls?

Michael McTernan (UNITED KINGDOM)

Message: 65625   

 

Apps get relocated and maybe linked against shared ELF libs, does that mean they should be built with long-calls too?  Or do all jumps generally fit within the 2^24 range, making this needless.

 

Having found kernel modules need this, I'm now wondering if it could be needed elsewhere too.

QuoteReplyEditDelete

 

 

2008-11-20 13:16:06     Re: Why don't apps need -mlong-calls?

Mike Frysinger (UNITED STATES)

Message: 65627   

 

FDPIC ELFs go through the PLT.  they do not need -mlong-calls.

QuoteReplyEditDelete

 

 

2008-11-20 13:45:44     Re: Why don't apps need -mlong-calls?

Michael McTernan (UNITED KINGDOM)

Message: 65629   

 

Cool - same for FLAT I guess?

 

[The ABI page says "The Linux Flat ABI is very close to the Standalone ELF run time, with the main differences being the application initialization."]

QuoteReplyEditDelete

 

 

2008-11-20 13:54:51     Re: Why don't apps need -mlong-calls?

Mike Frysinger (UNITED STATES)

Message: 65630   

 

there is no need for a PLT with FLAT ... as the docs say, it's a flat blob.  plus FLAT has limits on exec size, so breaching the 24pcrel limit isnt going to happen.  plus, you'd need a contiguous region of memory that is more than 2^24 bytes, so that isnt going to happen either.

QuoteReplyEditDelete

 

 

2008-11-21 08:04:17     Re: Why don't apps need -mlong-calls?

Michael McTernan (UNITED KINGDOM)

Message: 65682   

 

Okay.  Thankyou for clarifying this.

 

Slightly aside, I've got 128MB of SDRAM attached to my Blackfin, so I guess under some unlikely condition it maybe possible to get a 16M contigious region right after boot, but it's unlikely, and I've have to write 16M of code first!

QuoteReplyEditDelete

 

 

2008-11-21 09:04:50     Re: Why don't apps need -mlong-calls?

Mike Frysinger (UNITED STATES)

Message: 65684   

 

you might get it once, but you wouldnt be able to exit the app and run it again

Attachments

    Outcomes