From: Michael Tokarev <mjt@tls.msk.ru>
To: Denis Vlasenko <vda@ilport.com.ua>
Cc: linux-kernel@vger.kernel.org
Subject: Re: __FILE__ gets expanded to absolute pathname
Date: Tue, 25 Apr 2006 15:50:31 +0400 [thread overview]
Message-ID: <444E0D07.8060309@tls.msk.ru> (raw)
In-Reply-To: <200604251044.57373.vda@ilport.com.ua>
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
next prev parent reply other threads:[~2006-04-25 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 7:44 __FILE__ gets expanded to absolute pathname Denis Vlasenko
2006-04-25 11:03 ` Alistair John Strachan
2006-04-25 11:50 ` Michael Tokarev [this message]
2006-04-25 12:08 ` Denis Vlasenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=444E0D07.8060309@tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=vda@ilport.com.ua \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.