Segmentation fault when executing program compiled from x86 assembly?
问题 I'm new to assembly language and I have to implement a function, in my case sin(x), that could be called from a C source file. I have to make 2 separate files: *.c and *.s When compiling through gcc on ubuntu all good, but when the program executes it gives me the error "Segmentation fault"... To compile I type: gcc -c -o sinc.o sinx.c -g3 gcc -c -o sins.o sinx.s -g3 gcc -o sinx sinc.o sins.o -g3 When I start the program: ./sinx It prints: .......insert x: I put x in and then: segmentation