问题
I am trying to compile a simple hello program using gcc, but getting the below error. i am using ubuntu.
gcc -g -o hello hello.c
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped compilation terminated.
strace ld -v
execve("/usr/bin/ld", ["ld", "-v"], 0x7ffc43b744c8 /* 57 vars */) = 0 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x2} --- +++ killed by SIGSEGV (core dumped) +++ Segmentation fault (core dumped)
I tried reinstalling gcc and binutils, didn't work.
来源:https://stackoverflow.com/questions/57065480/compiler-gives-error-ld-terminated-with-signal-11