proper shared libbusybox building

Bernhard Fischer rep.nop at aon.at
Tue Feb 21 15:07:02 UTC 2006


On Tue, Feb 21, 2006 at 12:53:03AM -0500, Mike Frysinger wrote:
>On Tuesday 21 February 2006 00:45, Rob Landley wrote:
>> On Tuesday 21 February 2006 12:12 am, Mike Frysinger wrote:
>> > the current libbusybox.so is not built properly with -fPIC ... you x86
>> > users may not notice because the x86 toolchain accepts it without
>> > complaining (too much), but most other arches will abort the `gcc
>> > -shared` step because all the objects going into libbusybox.so are built
>> > w/out -fPIC
>> >
>> > i havent been keeping up on the busybox build system too much, so i wont
>> > be able to fix this without spending sometime learning it ... hopefully
>> > someone else out there can fix it quickly :)

A patch which fixes this and other stuff was sent to the list last week
(the buildsys touch-up patch).

As the patch is rather big and is cumbersome to maintain out of the
tree (and furthermore fixes stuff for the non-IMA case) i'm planning to
apply it soonish unless somebody objects loudly.

The patch also had an option to allow for building standalone applets in
a very userfriendly and convenient way. If Rob or anybody else is
opposed to the proposed way to do standalone applets, then I'd like to
hear how standalone applets are supposed to be built.

I'll follow-up to the initial thread with a slightly updated patch 02b
shortly..

>> > -mike
>>
>> Is PIC larger or smaller than normal code?
>>
>> We very much don't want to bloat the normal build...
>
>it is almost always larger ... however, you may be saving some diskspace but 
>you'll be wasting a ton of memory resources, the code will take longer to 
>load up because the dynamic loader will have to relocate it for every 
>application, etc...
>
>the whole point of a shared library is so that the resources are shared 
>between all programs that use the shared lib ... if the lib is not built as 
>PIC, then linux has to make a copy for every program that uses it
>-mike
>_______________________________________________
>busybox mailing list
>busybox at busybox.net
>http://busybox.net/cgi-bin/mailman/listinfo/busybox
>



More information about the busybox mailing list