2011-07-07 08:19:35     When to choose BFLT or FDPIC ELF?

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

2011-07-07 08:19:35     When to choose BFLT or FDPIC ELF?

Gilles Ganault (FRANCE)

Message: 102216   

Hello

 

The toolchain contains two versions of the binaries: bfin-uclinux to compile as BFLT, and bfin-linux-uclibc to compile as FDPIC ELF. Actually, a lot of binaries have the same size, so I don't know if they really do a different job internally.

 

The wiki says that 1) if an application relies on shared libraries, the application and the libraries must be compiled using the same format, and 2) it's easier to compile a shared library as FDPIC ELF.

I guess this means that FDPIC ELF is the recommended format for applications that rely on shared libraries, while BFLT is recommended for applications that include libraries statically within the application.

 

However, when compiling applications myself, ie. those that aren't part of uClinux-dist, how can I make an informed choice about which format to use? So far, I've always used "CC=bfin-linux-uclibc-gcc", but maybe there are applications that would be better off being compiled as BFLT.

 

Thank you.

QuoteReplyEditDelete

 

 

2011-07-07 11:53:00     Re: When to choose BFLT or FDPIC ELF?

Mike Frysinger (UNITED STATES)

Message: 102220   

 

if you're running a lot of applications using shared libraries, then generally the whole system built as FDPIC makes more sense as all the readonly sections (.text/.rodata/etc...) get shared among all the apps.

 

if you're running only a few applications, then FLAT is probably better as it only links in the functions it actually uses.

 

it's a simple trade off ... FDPIC shares code while FLAT doesnt, but if you dont need to share anything, then FLAT is probably better.

QuoteReplyEditDelete

 

 

2011-07-08 19:42:06     Re: When to choose BFLT or FDPIC ELF?

Gilles Ganault (FRANCE)

Message: 102271   

 

Thanks for the info.

Attachments

    Outcomes