lkml.org 
[lkml]   [2006]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: __FILE__ gets expanded to absolute pathname
Denis Vlasenko wrote:
> Sometime ago I noticed that __FILE__ gets expanded into
> *absolute* pathname if one builds kernel in separate object directory.
>
> I thought a bit about it but failed to arrive at any sensible
> solution.
>
> Any thoughs?
> --
> vda
>
> # strings vmlinux | grep /usr/src
> /.share/usr/src2/kernel/linux-2.6.16.via-rhine.src/drivers/net/3c505.c
> /.share/usr/src2/kernel/linux-2.6.16.via-rhine.src/arch/i386/kernel/time.c
....

As far as I remember, this happens when compiling with O=xxx only, ie,
only when specifying alternative object (or source) directory. Normally
(when you compile in the source directory) they'll be like drivers/net/3c505.c,
arch/i386/kernel/time.c etc, ie, relative to the kernel top source dir.
It's because when you specify O= etc, complete source dir is passed from
makefiles, instead of relative one.

But it was long time since I switched to symlink-tree + compile instead of
compiling with O=, and things may had changed since that.

/mjt
-
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/

\
 
 \ /
  Last update: 2006-04-25 13:53    [W:0.062 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site