[PATCH] make it possible to keep Config/Kbuild snippets in *.c files

Denys Vlasenko vda.linux at googlemail.com
Fri May 14 18:34:03 UTC 2010


2010/5/14 Timo Teräs <timo.teras at iki.fi>:
> On 05/14/2010 09:22 AM, Rob Landley wrote:
>> On Sunday 09 May 2010 09:19:58 Denys Vlasenko wrote:
>>> On Sunday 09 May 2010 07:31, Rob Landley wrote:
>
> While at it, we could get rid of include/applets.h too. One very nice
> way would be to use linker section. You can use gcc __attribute__
> section("sectionname") [1] to put the applet definitions to separate
> memory area. It is after that possible to iterate over the structures
> in that special section using __start_sectionname and __stop_sectionname
> symbols which are autocreated [2]. This is also roughly how Linux kernel
> initcalls work [3].

This will break ld --gc-sections.

-- 
vda


More information about the busybox mailing list