fixunix
Tags Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

How to link the object files(.o) into one BIG object file with "Symbols partly located" ? - Embedded

This is a discussion on How to link the object files(.o) into one BIG object file with "Symbols partly located" ? - Embedded ; Hi, "Symbols partly located" is means: Link some .o files with option "-Ttext 0xXXXXXX" of "ld" (fixed the offset of .text segment), So I want the "ld" will locate the .text with symbols those are already exist in .o files ...


Fix Unix > Linux > Help > Embedded > How to link the object files(.o) into one BIG object file with "Symbols partly located" ?

Reply
 
LinkBack Tools
  #1  
Old 09-30-2007, 10:07 AM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default How to link the object files(.o) into one BIG object file with "Symbols partly located" ?

Hi,

"Symbols partly located" is means:


Link some .o files with option "-Ttext 0xXXXXXX" of "ld" (fixed the
offset of .text segment),
So I want the "ld" will locate the .text with symbols those are
already exist in
.o files . keep the undefined symbols for an other follow link.


But ,"ld" will fail to output *BIG* .o file. Because there are
undefined symbols.


Please give your advice, thank you. (to the exclusion of dynmaic
library solution ,please)


ELF symbol table:


CONTENTS, READONLY
SYMBOL TABLE:
....
00007414 l F .text 0000002c _ZN6CToolsD0Ev
00000604 l O .rodata 00000008 _ZTI4CMgr
0000728c l F .text 0000006c _ZN4CMgrD1Ev
000072f8 l F .text 00000074 _ZN4CMgrD0Ev <<< exits <<<<<
....
00000000 *UND* 00000000 _Unwind_SjLj_Unregister
00000000 g F .text 000003dc _ZN9CSdhXcMgrC2EP3CNe
00000000 *UND* 00000000 _ZnwjmPKc
00000000 *UND* 00000000 _ZN8CAdapterC1Ev << keep it for
link again<
00000530 g O .rodata 00000068 _ZTV9CSdhXcMgr


thank you!


Tangkun

Reply With Quote
  #2  
Old 09-30-2007, 10:07 AM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: How to link the object files(.o) into one BIG object file with"Symbols partly located" ?

"tangkun" writes:

> "Symbols partly located" is means:


Doesn't "ld -r -o big.o -Ttext 0xXXXXX foo.o bar.o ..." do exactly what
you want?

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Reply With Quote
  #3  
Old 09-30-2007, 10:07 AM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: How to link the object files(.o) into one BIG object file with "Symbols partly located" ?

Paul Pluzhnikov 写道:

> "tangkun" writes:
>
> > "Symbols partly located" is means:

>
> Doesn't "ld -r -o big.o -Ttext 0xXXXXX foo.o bar.o ..." do exactly what
> you want?
>
> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.



Hi Paul,

Thank for your advice.
But ld with "-r" will output object with all symbols NOT located(the
output just
like a Normal .o file, not doing any location).

I want ld will output a "partial" located object:
Those symbols already exisit in foo.o bar.o ... need be update into
all .text segment.
And, keep the undefined(*UND*) symbols for ld again.


Cheers,

Tangkun

Reply With Quote
Reply

Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: problem for" Can't locate object method "boot" via package "mod_perl" unix modperl 0 10-16-2008 06:22 AM
How to change class of a file object ("Become" page functionality)? unix OS2 34 07-12-2008 04:46 PM
gcc build fails "cannot compute suffix of object files" unix Solaris 56 06-13-2008 04:43 PM
RSS/RSM "object identifier does not represent a valid object" unix Storage 3 10-08-2007 09:02 AM
How to link the object files(.o) into one *BIG* object file with "symbols partly located" ? unix VxWorks 0 10-02-2007 08:25 AM


All times are GMT. The time now is 10:52 AM.