mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: lkml List <linux-kernel@vger.kernel.org>,
	"linuxppc-dev@ozlabs.org list" <linuxppc-dev@ozlabs.org>
Subject: Re: How to link a .o with all modules
Date: Mon, 2 Jun 2008 23:55:19 -0500	[thread overview]
Message-ID: <9B953237-99D2-4593-9A29-242424CDDB29@kernel.crashing.org> (raw)
In-Reply-To: <20080508202200.GA12578@uranus.ravnborg.org>


On May 8, 2008, at 3:22 PM, Sam Ravnborg wrote:

> On Thu, May 08, 2008 at 09:16:10AM -0500, Kumar Gala wrote:
>>
>> On May 5, 2008, at 3:44 PM, Sam Ravnborg wrote:
>>
>>>>>
>>>>>
>>>>> Let me know if this does address your question.
>>>>
>>>> The problem is MODPOST complains about undefined symbols:
>>>>
>>>> MODPOST 24 modules
>>>> ERROR: "_restgpr_20_x" [net/key/af_key.ko] undefined!
>>>> ERROR: "_restgpr_25_x" [net/key/af_key.ko] undefined!
>>>> ERROR: "_restgpr_30_x" [net/key/af_key.ko] undefined!
>>>
>>> I need a bit more context to try to analyse this.
>>> Where did you expect _restgpr_20_x to be defined.
>>> If in vmlinux then were they present in the
>>> Module.symvers file?
>>
>> No they aren't there since we I'm not EXPORT_SYMBOL() them.  Should I
>> also be doing EXPORT_SYMBOL?
>
> So modpost claim it cannot find the symbols.
>
>>
>>> If in the linked in .o file - could you
>>> see the symbols using objdump.
>>
>> Yes.
>>
>> readelf -a:
>>
>> ...
>> Symbol table '.symtab' contains 113 entries:
>>   Num:    Value  Size Type    Bind   Vis      Ndx Name
>> ...
>>     5: 00000000     0 FUNC    GLOBAL DEFAULT    1 _savegpr_14
>>     6: 00000000     0 FUNC    GLOBAL DEFAULT    1 _save32gpr_14
>> ...
>
> Strange.
>
> I did not look closer.
> But it looks like the linker failed to resolve these symbols
> in the final link somehow - despite the symbols are present in
> the linked in .o file.
>
> Can you try to drop me the output of the relocation records for the
> finally linked .o file (the one with your .o file linked in).
>
> objdump -r IIRC


Sam,

Didn't see any feedback from the relocation records.

- k

  parent reply	other threads:[~2008-06-03  4:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-04 18:22 Kumar Gala
2008-05-04 19:24 ` Sam Ravnborg
2008-05-05 14:46   ` Kumar Gala
2008-05-05 20:44     ` Sam Ravnborg
2008-05-08 14:16       ` Kumar Gala
2008-05-08 20:22         ` Sam Ravnborg
2008-05-09 13:52           ` Kumar Gala
2008-05-12 15:51             ` Kumar Gala
2008-06-03  4:55           ` Kumar Gala [this message]
2008-05-04 23:27 ` H. Peter Anvin
2008-05-04 23:38   ` Paul Mackerras

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=9B953237-99D2-4593-9A29-242424CDDB29@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sam@ravnborg.org \
    /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

all inboxes | Powered by JetHome®