This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Champs,
I have following questions for relocatable objects. CGT is C6000 7.2.3
Note that partial linking without “-ar” is used and that the abi is set to ELF format.
1) –priority flag & relocatable object :
What is the expected linker behaviour when the --priority flag is used together with one relocatable object and several libs in order to create a (static) executable object.
The observation is that for symbol resolution the relocatable object symbols always gets priority over the lib symbols independent on his placement on the command line (before / after lib flags).
2) relocatable object && conditional linking:
Contrary to the statements from (http://processors.wiki.ti.com/index.php/DSP/BIOS_on_Multi-Core_sharedimage), that states that conditional linking is disabled for relocatable objects we have observed that the final executable is only containing symbols from the relocatable object that correspond to unresolved symbols of application object files. It is to be mentioned that these symbols were originally part of a library.
Kind regards,
one and zero
one and zero said:What is the expected linker behaviour when the --priority flag is used together with one relocatable object and several libs in order to create a (static) executable object.
The symbols defined in an object module always take priority over symbols defined in any library. This is true whether or not use you use --priority. The --priority flag affects the order libraries are searched to find the definition of a symbol. And that order is given by where the library names appear on the command line and/or command files.
one and zero said:2) relocatable object && conditional linking:
I'm sorry, but this is still too confusing for me. At the beginning of the post you state partial linking is being used. But this paragraph refers to "the final executable". That says that partial linking is not being used. It cannot be both. It seems a diagram of some sort would help. Here's one idea ... Sketch it out by hand, scan it in, and attach the .jpg (or whatever) file to your next post.
Thanks and regards,
-George
Hi George,
just for your info. The issue is resolved. The problem was that conflicting flags were set in the linker command file and in the CCS GUI.
Cleaning this up led to expected behavior.
Thanks,
one and zero