You are correct about formatting being the issue, but in the wrong place. Whatever encoding you are using for a single dash "-" is three bytes, and your terminal does not like it. Were you copying the example from somewhere that misencoded the character? Try to replace them with your own dashes to see if this resolves the issue.
As a programmer, try to look at the error as a stack, and dig backwards until you find the root cause of it:
ld ���T link.ld ���o kernel.bin main.o boot.o
ld: cannot find ���T: No such file or directory
link.ld: file not recognized: File format not recognized
This is not your linker putting out something misformatted, it appears to be reporting it is looking for a file named ???T and you must investigate it.
Why is T important? And what is the filename after it?
Look at the man page for ld: http://linux.die.net/man/1/ld
You can see that ld can use linker scripts with the switch -T, and the dash is clearly missing from the output, and therefor the dash must be the offending character (converted in to three bytes when put in an eight bit-per-character environment such as the common console)
Alexander.Go to the full post