[lkml]   [2007]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Patches for REALLY TINY 386 kernels
On Wednesday 18 July 2007 22:04, Andi Kleen wrote:
> Better just write less bloated code. Perhaps mandatory bloatometer
> runs during -rc*s for kernels with minimal config with public code pig shame lists
> similar to the regression lists are useful. Anyone volunteering?
> I suspect there is also much more low hanging fruit of this around.

Thousands "static int flag" variables taking 4 bytes where 1 byte
(actually 1 bit) would suffice. And when you do "flag = 1" -
store insns for bytes are also shorter by 3 bytes, _each_.

Unused code/data linked in
(-ffunction-sections -fdata-sections -Wl,--gc-sections may help)

int global_n; char global_c; int global_m;
and you lose 3 bytes to alignment.
(How to instruct linker to sort sections by alignment or at least for size?
Tried -ffunction-sections -fdata-sections -Wl,--sort-section,alignment
but it seems to only (try to) sort .data, not .data.var_name sections)

Massive inlining. Example: more than 80k of bloat in aic7*xx driver
because of gigantic inlined I/O access functions.

Sadistic alignment by gcc for structs/strings >= 32 bytes.
(gcc 4.2.1 is better, just don't forget -mpreferred-stack-boundary=2)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-07-30 20:03    [W:0.064 / U:4.872 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site