Write down to their own memo, in the process of using GCC found that the original passed to the linker LD can use both Xlinker and WL two commands, both of these commands can be correctly passed to the LD as the use, now summarizes the difference between the two.
Xlinker The argument followed by the first is a space, and the first character followed by the WL is ",".
For the pass "-assert definitions" command to LD, Xlinker to pass two parameters at a time to write two times "Xlinker", such as-xlinker-assert-xlinker Defintions instead of-xlinker "-assert definitions" because the linker would consider this to be a parameter, not two parameters. If you're using GNU linker at this point, it's usually easier to use option=value, like-xlinker-map-xlinker Output.mp can be abbreviated as-XLINKER-MAP=OUTPUT.MAP. And for the Wl, because his parameter segmentation is to use "," so you can not write as many as xlinker, just need to write a number of commas can, take this example, can be written-wl,-map, Output.map of course, if you use the GNU linker you can also-wl,-map=output.map.
So for rpath to use Xlinker can be written-xlinker-rpath-xlinker <dir> (-xlinker-rpath=<dir>), for the Wl can be written-wl,rpath,< Dir> (-wl,rpath=<dir>).
GCC options-xlinker and-WL differences