[Solved] hello.s:15 Error: junk at end of line, first unrecognized character valued 0x8

gccThe compiler reports the following error.
hello.s: warning: end of file, not end of line; insert new line
hello.s:1: Error: junk at end of line, first unrecognized character valued 0x7f
hello.s:1: Error: junk at end of line, first unrecognized character valued 0x3
hello.s:1: Error: junk at end of line, first unrecognized character is >' hello.s:1: Error: junk at end of line, first unrecognized character valued 0x1 hello.s:1: Error: junk at end of line, first unrecognized character is0′
hello.s:1: Error: junk at end of line, first unrecognized character is @' hello.s:1: Error: junk at end of line, first unrecognized character is(‘
hello.s:1: Error: junk at end of line, first unrecognized character is @' hello.s:1: Error: junk at end of line, first unrecognized character is8′
hello.s:1: Error: junk at end of line, first unrecognized character is @' hello.s:1: Error: junk at end of line, first unrecognized character valued 0x1b hello.s:1: Error: junk at end of line, first unrecognized character valued 0x1a hello.s:1: Error: junk at end of line, first unrecognized character valued 0x1a hello.s:1: Error. junk at end of line, first unrecognized character valued 0x6 hello.s:1: Error: junk at end of line, first unrecognized character valued 0x4 hello.s:1: Error: junk at end of line, first unrecognized character is@’
There is no correct solution on the Internet, so I studied it carefully. gcc compiler is fine, the problem is that the gcc code is typed in the wrong case!
The correct command is as follows

gcc -E hello.c -o hello.i -v
gcc -S hello.i -o hello.s -v
gcc -c hello.s -o hello.o -v

When generating the. S file, the s of GCC – s should be capitalized
otherwise, an error will occur when GCC – C generates the. O file!!


Read More: