public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Kai Germaschewski <kai.germaschewski@unh.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Andrew Morton <akpm@osdl.org>,
	kai@germaschewski.name, Sam Ravnborg <sam@ravnborg.org>,
	Vincent Vanackere <vincent.vanackere@gmail.com>,
	keenanpepper@gmail.com,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Undefined symbols in 2.6.11-rc5-mm1
Date: Fri, 4 Mar 2005 21:28:42 +0100	[thread overview]
Message-ID: <20050304202842.GH3327@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0503041403470.15777-100000@chaos.sr.unh.edu>

On Fri, Mar 04, 2005 at 02:11:13PM -0500, Kai Germaschewski wrote:
> On Fri, 4 Mar 2005, Rusty Russell wrote:
> 
> > On Wed, 2005-03-02 at 15:00 +0100, Adrian Bunk wrote:
> > > Why doesn't an EXPORT_SYMBOL create a reference?
> > 
> > It does: EXPORT_SYMBOL(x) drops the address of "x", including
> > __attribute_used__, in the __ksymtab section.
> 
> Well, the problem is that this is still an internal reference in the same 
> object file. So ld looks into the lib .a archive, determines that none of 
> the symbols in that object file are needed to resolve a reference and 
> drops the entire .o file. Doing so, it drops the __ksymtab section as 
> well, which otherwise would be used by the kernel to look up that symbol. 
> 
> So it drops the reference and the referencee ;), which is normally fine -- 
> no unresolved symbols occur. Unfortunately, the kernel really needs to 
> know the contents of the __ksymtab sections to correctly export those 
> symbols, but it doesn't reference it in any explicit way.
> 
> I don't think there's an easy fix, except for not putting such objects 
> into an archive/lib, but to link them directly.

Silly question:
What's the advantage of lib-y compared to obj-y?

> --Kai

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2005-03-04 20:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-02  5:37 Undefined symbols in 2.6.11-rc5-mm1 Keenan Pepper
2005-03-02  9:23 ` Andrew Morton
2005-03-02  9:45   ` Vincent Vanackere
2005-03-02 11:24     ` Andrew Morton
2005-03-02 13:26       ` Vincent Vanackere
2005-03-02 14:00       ` Adrian Bunk
2005-03-02 16:28         ` Andrew Morton
2005-03-02 17:23           ` Valdis.Kletnieks
2005-03-02 17:34             ` Andrew Morton
2005-03-04 10:26             ` Rusty Russell
2005-03-03 13:41           ` Adrian Bunk
2005-03-04 10:23         ` Rusty Russell
2005-03-04 18:56           ` Adrian Bunk
2005-03-04 19:13             ` Adrian Bunk
2005-03-04 19:11           ` Kai Germaschewski
2005-03-04 20:28             ` Adrian Bunk [this message]
2005-03-05  5:09               ` Kai Germaschewski
2005-03-05 13:04                 ` Adrian Bunk
2005-03-05 15:19                   ` Kai Germaschewski
2005-03-05 15:36                     ` Adrian Bunk
2005-03-05 16:36                       ` Kai Germaschewski
2005-03-05 17:15                         ` Adrian Bunk
2005-03-05 18:48                           ` Kai Germaschewski
2005-03-05 23:58                         ` Christoph Hellwig
2005-03-05 23:57                     ` Christoph Hellwig
     [not found]   ` <4225C613.7010701@gmail.com>
2005-03-02 14:03     ` Keenan Pepper

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=20050304202842.GH3327@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=kai.germaschewski@unh.edu \
    --cc=kai@germaschewski.name \
    --cc=keenanpepper@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=sam@ravnborg.org \
    --cc=vincent.vanackere@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox