Compiling busybox to .s assembly file

Eric Schulte eschulte at cs.unm.edu
Mon Mar 7 02:23:21 UTC 2011


Denys Vlasenko <vda.linux at googlemail.com> writes:

> On Thursday 03 March 2011 03:02, Eric Schulte wrote:
>> >> > Please see scripts/Makefile.IMA
>> >> >
>> >> > It may be a bit bit-rotted (because I don't use it, and people
>> >> > who do use it send me updates far too infrequently), so you might
>> >> > be forced to fix it up before it'll work for you...
>> >> >
>> >> > It runs entire compilation as one gcc invocation.
>> >> >
>> >> > I imagine adding the -S switch might be an easy-ich way
>> >> > to generate one BIG .s file with the entire busybox
>> >> > code.
>> >> 
>> >> Hi Denys,
>> >> 
>> >> This would be a very nice option, and while I'm currently able to tinker
>> >> with the asm for a single applet it would be preferable to have the
>> >> entire busybox program compiled to a single .s file.  I've tried playing
>> >> with Makefile.IMA, and more generally with the "--combine" option to
>> >> GCC, however I keep running into the same error, namely
>> >> 
>> >>   include/libbb.h:1670: error: conflicting types for ‘ptr_to_globals’
>> >
>> > Can you send me the entire error message?
>> 
>> Hi Dennys,
>> 
>> The attached file holds the output of running
>> 
>>   make -f scripts/Makefile.IMA
>
> I pushed a few fixes to git and current git works for me with gcc-4.2.1,
> however, gcc 4.4.5 still throws
>
> include/libbb.h:1669: error: conflicting types for ‘ptr_to_globals’
> include/libbb.h:1669: note: previous declaration of ‘ptr_to_globals’ was here
>
> messages.

Ah, Thanks so much, this works wonderfully.

With the latest from git I was able to build an executable using
Makefile.IMA with gcc-4.1, and with the attached minimal changes to
Makefile.IMA I was able to generate a single large intermediate asm
file, and then link that into a working executable.

I will certainly report back if I generate anything useful.

Thanks -- Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile-asm-changes.patch
Type: text/x-diff
Size: 1142 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20110306/b5ce4b3e/attachment.bin>
-------------- next part --------------

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/


More information about the busybox mailing list