Re: [PATCH] Fix BUG macro

Andrew Morton (akpm@zip.com.au)
Thu, 16 May 2002 23:44:29 -0700


Rusty Russell wrote:
>
> In message <3CE48C08.B0E59851@zip.com.au> you write:
> > Some explanation of how this works, and of why I should not fill
> > your ear with toothpaste would be appreciated here.
>
> When an include file is found using "-I dir", __FILE__ in that include
> file is "dir/filename":
>
> gcc -D__KERNEL__ -I/usr/src/working-2.5.15-bug/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=delay -c -o delay.o delay.c
>
> Hope that helps,

It would help if you told us whether you're using a toolchain which
combines strings across .o files.

Presumably, you're not. So the space savings which you're seeing
are due to lessening the bloat which is caused by the inline functions
in headers which expand BUG(). Which is what out_of_line_bug() does too.
Assuming the toolchain fixes that for us in 2.5, you've gone and added
zillions of function names to the kernel image.

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/