* file names embedded in kernel image
@ 2015-08-27 9:44 Rasmus Villemoes
2015-10-26 19:46 ` Michal Marek
0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2015-08-27 9:44 UTC (permalink / raw)
To: linux-kbuild
Hi
I just noticed that when one build the kernel outside the source tree,
all __FILE__ occurences get replaced with the absolute path (since
that's what is given to gcc, and most -I paths are also absolute). This
ends up wasting quite a lot of space in .rodata, and I suppose most
distro supplied kernels have this issue. For example, my ubuntu kernel
is full of strings like
/build/linux-hFNI9K/linux-3.13.0/arch/x86/platform/sfi/sfi.c
/build/linux-hFNI9K/linux-3.13.0/kernel/fork.c
The /build/linux-hFNI9K/linux-3.13.0/ prefixes add up (and since it's an
artifact of the build process, wouldn't add any value in a bug-report
which one wouldn't also get from uname -a).
Distros could avoid this by building in-tree (maybe some already do) but
I was wondering if we could do something upstream.
Rasmus
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: file names embedded in kernel image
2015-08-27 9:44 file names embedded in kernel image Rasmus Villemoes
@ 2015-10-26 19:46 ` Michal Marek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2015-10-26 19:46 UTC (permalink / raw)
To: Rasmus Villemoes; +Cc: linux-kbuild
Dne 27.8.2015 v 11:44 Rasmus Villemoes napsal(a):
> Hi
>
> I just noticed that when one build the kernel outside the source tree,
> all __FILE__ occurences get replaced with the absolute path (since
> that's what is given to gcc, and most -I paths are also absolute). This
> ends up wasting quite a lot of space in .rodata, and I suppose most
> distro supplied kernels have this issue. For example, my ubuntu kernel
> is full of strings like
>
> /build/linux-hFNI9K/linux-3.13.0/arch/x86/platform/sfi/sfi.c
> /build/linux-hFNI9K/linux-3.13.0/kernel/fork.c
If you build in a subdirectory of the source tree, the filenames will
look like
../arch/x86/platform/sfi/sfi.c
../kernel/fork.c
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-26 19:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-27 9:44 file names embedded in kernel image Rasmus Villemoes
2015-10-26 19:46 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).