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

Problem encountered during Linking

Note: This was originally posted on 23rd August 2010 at http://forums.arm.com

Hey all,

I have been trying to migrate a Codesourcery compatible code to armcc compatible code. I have been able to compile source files (both .c and .S files) using armcc. So, I have these .o object files with me and a linker script (which was already written and is compatible with Codesourcery). I need to link all my .o object files to generate the .exe executable.

I had read few documents which suggested me to use --translate_gld with armcc. So, I used the command :-
armcc --translate_gld -static --gc-sections -no-warn-mismatch -T LINKER.lds -o EXECUTABLE.exe file1.o file2.o

and got the following error:-
Fatal error: L3900U: Unrecognized option '--linker_script'.
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.

The original arm-none-eabi-ld command was :-
arm-none-eabi-ld --gc-sections -no-warn-mismatch -T LINKER.lds -o EXECUTABLE.exe file1.o file2.o


Please suggest me how to carry out the linking. Do I need to change the linker script? or am I missing out some command line options.

Thanks and Regards
Abhinav Varma
  • Note: This was originally posted on 25th August 2010 at http://forums.arm.com

    and got the following error:-
    Fatal error: L3900U: Unrecognized option '--linker_script'.


    I wonder if your armink might be out-of-date compared with your armcc.  What is the output of
        armcc --vsn
        armlink --vsn
    ?

    It might also be worth checking if there is is more than one armlink to be found on PATH.
  • Note: This was originally posted on 25th August 2010 at http://forums.arm.com

    I wonder if your armink might be out-of-date compared with your armcc.  What is the output of
        armcc --vsn
        armlink --vsn
    ?

    It might also be worth checking if there is is more than one armlink to be found on PATH.



    following are the results:-
    armcc --vsn
    ARM C/C++ Compiler, RVCT4.0 [Build 821]

    armlink --vsn
    ARM Linker, RVCT4.0 [Build 821]

    Thanks and Regards
    Abhinav
  • Note: This was originally posted on 25th August 2010 at http://forums.arm.com

    It might also be worth checking if there is is more than one armlink to be found on PATH.



    $PATH
    bash: /cygdrive/c/Progra~1/CodeSo~1/Source~1/bin:/cygdrive/c/Progra~1/ARM/bin/win_32-pentium:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Progra~1/ARM/RVI/Tools/3.3/106/programs/win_32-pentium:/cygdrive/c/Progra~1/ARM/RVD/Core/4.0/1106/win_32-pentium/bin:/cygdrive/c/Progra~1/ARM/RVCT/Programs/4.0/400/win_32-pentium:/cygdrive/c/Progra~1/ARM/Utilities/FLEXlm/10.8.5.0/1/win_32-pentium:/cygdrive/c/Progra~1/ARM/RVI/GDB/3.3/8:/usr/lib/lapack:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/bin: