reduce the size of busybox

Bernhard Fischer rep.nop at aon.at
Mon Jun 12 19:33:01 UTC 2006


On Mon, Jun 12, 2006 at 03:07:44PM -0400, Rob Landley wrote:
>On Monday 12 June 2006 2:58 pm, Bernhard Fischer wrote:
>> On Mon, Jun 12, 2006 at 06:36:29PM +0200, Bernhard Fischer wrote:
>> >On Mon, Jun 12, 2006 at 10:17:11AM -0400, Rob Landley wrote:
>> >>Hopefully _this_ is going to merge strings. :)
>> >
>> >I doubt that.
>>
>> Just to reiterate:
>> The problem is that you currently cannot do automatic substring merging.
>> Our "normal" strings are properly merged, while these two examples are
>> simply not equal:
>>
>> "foo"
>> "foo\nbar"
>>
>> So we end up with both strings, each with it's full length.
>> They _are_ in .rodata.str (depending on where they are used of course).
>>
>> That's why it helps if we say
>> sub="foo%s"
>> foo = sub, ""
>> foobar = sub,"\nbar"
>> because there we can obviously reuse 'sub', so save the dups.
>
>Right now the compiler isn't doing the _easy_ substring merges, which is 
>simply broken.

What is the difference between easy and not easy there?



More information about the busybox mailing list