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

Unrecognized option '-Wl,--mgen-symbol-ld-script=export.txt'

Hello,I try to add a script '-Wl,--mgen-symbol-ld-script=export.txt' in "optins for target"/"linker"/"misc controls". After build, when linking it shows

error: L3900U: Unrecognized option '-Wl,--mgen-symbol-ld-script=export.txt'.

Any idea how to fix this error?

Parents
  • Hi Kelong

    it looks like you are using Keil MDK so you may get a higher qualith answer in that forum. 

    My guess from the error message is that the string in that box is passed to armlink so needs to be valid armlink options. -Wl, is not an armlink option, it is an armclang option to prefix other options that you want to pass to the linker when invoking it from the compiler driver (including when compiling and linking in one step.) So I would forst remove the -Wl, prefix. 


    You then need to check in your manual whether mgen-symbol-ld-script=export.txt is also a valid armlink option. It looks wrong to me, I think armlink doesn’t support GNU linker scripts. I am guessing you might be looking for the —symdefs option given that you pass a scatter file in the below box. But my knowledge of armlink’s commandline is out of date so you are better off asking in the Keil forum.

    Hope that is helpful

    Rich

Reply
  • Hi Kelong

    it looks like you are using Keil MDK so you may get a higher qualith answer in that forum. 

    My guess from the error message is that the string in that box is passed to armlink so needs to be valid armlink options. -Wl, is not an armlink option, it is an armclang option to prefix other options that you want to pass to the linker when invoking it from the compiler driver (including when compiling and linking in one step.) So I would forst remove the -Wl, prefix. 


    You then need to check in your manual whether mgen-symbol-ld-script=export.txt is also a valid armlink option. It looks wrong to me, I think armlink doesn’t support GNU linker scripts. I am guessing you might be looking for the —symdefs option given that you pass a scatter file in the below box. But my knowledge of armlink’s commandline is out of date so you are better off asking in the Keil forum.

    Hope that is helpful

    Rich

Children
No data