Re: Regarding symbol resolving in VxWorks
- From: satish.lvr@xxxxxxxxx
- Date: Thu, 26 Jun 2008 19:56:30 -0700 (PDT)
On Jun 27, 7:32 am, "Michael R. Kesti" <michaelke...@xxxxxxxxxx>
wrote:
"Ignacio G.T." wrote:
satish....@xxxxxxxxx escribió:
I have one more question. It will be helpful for me if anybody
clarifies me this.
I built one library "libtest.a" which has functions named func1,
func2, func3, func4, func5 , func6 in a single file.
And I built one application "app.out" which uses only one function
func5 from above library.
[X]
Is there any way to link only the function func5 in my application?
I thought of breaking each function into different file but this is
not effective solution for me.
This is the only solution, as far as I know. The linker always links
whole compilation units, i.e., object files (*.o).
This, for most linkers, is true for object files (*.o) but not for
libraries/archives. This can be observed in the VxWorks driver libs
where multiple drivers are archived per file but only those referenced
are linked into the output file.
Satish, you can help us help you by providing more information. What
tool set are you using? How did you build the library and how are you
linking it into you app.out. (Supplying actual command lines would be
a good way to answer the latter.)
You know, it could be that, because you are creating an application, the
partial linker rules are being used and the linker decides it cannot know
which functions are going to be ultimately referenced and therefore
includes them all.
Why is this not effective for you?
Regardless of the answer to that question, this is an interesting
"academic" query!
--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mrkesti at hotmail dot com | - The Who, Bargain- Hide quoted text -
- Show quoted text -
Hi Michael,
I am using MIPS64gnu tool chain.
I built my library by setting archive in the "rules" tab.
Then, in my application project, I am giving following commands in
"rules" tab.
Target : app.out dependencies : test_app.a
$(LD) -EB -r -o app.out app.o -LD:/Satish-6-23-2008/test_lib\MIPS64gnu
-ltest
In above command, app.c is my application, libtest.a is my library.
Please let me know if I have any problem with commnd options.
Regards
Satish.
.
- Follow-Ups:
- Re: Regarding symbol resolving in VxWorks
- From: Michael R. Kesti
- Re: Regarding symbol resolving in VxWorks
- References:
- Regarding symbol resolving in VxWorks
- From: satish . lvr
- Re: Regarding symbol resolving in VxWorks
- From: Michael R. Kesti
- Re: Regarding symbol resolving in VxWorks
- From: satish . lvr
- Re: Regarding symbol resolving in VxWorks
- From: Ignacio G.T.
- Re: Regarding symbol resolving in VxWorks
- From: Michael R. Kesti
- Regarding symbol resolving in VxWorks
- Prev by Date: Re: Regarding symbol resolving in VxWorks
- Next by Date: Re: Regarding symbol resolving in VxWorks
- Previous by thread: Re: Regarding symbol resolving in VxWorks
- Next by thread: Re: Regarding symbol resolving in VxWorks
- Index(es):
Relevant Pages
|