This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Linking two different libraries.

Note: This was originally posted on 16th February 2010 at http://forums.arm.com

[font="Verdana"]
[size=2]
Hi,

How do I link two different libraries each of which have been generated by two different Compiler set? The first one's generated by using ADS 1.2 while the second one's generated by using RVDS 2.2. For linking, I need to use the RVDS 2.2 linker. Also, will I need to make any changes in other files such as the Scatter Load file (.scl) or Map file (.map) for generating the ELF as a result of linking this two separate libraries?

If somebody could also provide me the command-line options to be given to the linker for this purpose, that would be of help too.

If the above details are falling short for you to be able to answer this question, please do let me know the specifics that you need. I'll try to provide them at the earliest.

-Pritam.
[/size]
[/font]
Parents
  • Note: This was originally posted on 16th February 2010 at http://forums.arm.com

    How do I link two different libraries each of which have been generated by two different Compiler set? The first one's generated by using ADS 1.2 while the second one's generated by using RVDS 2.2. For linking, I need to use the RVDS 2.2 linker. Also, will I need to make any changes in other files such as the Scatter Load file (.scl) or Map file (.map) for generating the ELF as a result of linking this two separate libraries?


    RVDS and ADS use different binary ABIs, so you have to compile the RVDS library (and any code that library is linked with) using the old ADS ABI. If you don't then there is a high probability that (1) it won't work, or (2) it will look like it works and then crash in rather nasty and hard to predict ways. More information is provided on this documentation page:

    [url="http://infocenter.arm.com/help/topic/com.arm.doc.dui0202f/Chdccfff.html"]http://infocenter.arm.com/help/topic/com.a...f/Chdccfff.html[/url]

    In terms of how to link - the same as you would link two binaries produced with the same compiler set - there is nothing special about linking two libraries from different tool sets.

    Note that the ADS ABI is deprecated in RVDS 2.2 and removed from RVDS 3.0, so it is not possible to link old binaries with the newer versions of the compiler - you will need to recompile old binaries from source with the newer tools.
Reply
  • Note: This was originally posted on 16th February 2010 at http://forums.arm.com

    How do I link two different libraries each of which have been generated by two different Compiler set? The first one's generated by using ADS 1.2 while the second one's generated by using RVDS 2.2. For linking, I need to use the RVDS 2.2 linker. Also, will I need to make any changes in other files such as the Scatter Load file (.scl) or Map file (.map) for generating the ELF as a result of linking this two separate libraries?


    RVDS and ADS use different binary ABIs, so you have to compile the RVDS library (and any code that library is linked with) using the old ADS ABI. If you don't then there is a high probability that (1) it won't work, or (2) it will look like it works and then crash in rather nasty and hard to predict ways. More information is provided on this documentation page:

    [url="http://infocenter.arm.com/help/topic/com.arm.doc.dui0202f/Chdccfff.html"]http://infocenter.arm.com/help/topic/com.a...f/Chdccfff.html[/url]

    In terms of how to link - the same as you would link two binaries produced with the same compiler set - there is nothing special about linking two libraries from different tool sets.

    Note that the ADS ABI is deprecated in RVDS 2.2 and removed from RVDS 3.0, so it is not possible to link old binaries with the newer versions of the compiler - you will need to recompile old binaries from source with the newer tools.
Children
No data