I am currently using the linux-x86.img which I downloaded from the documentation page for gem5 (http://www.m5sim.org/Download), but since I was not able to compile the fscanf and fopen commands on this image I was wondering if there is a more recent image which I could download and use instead.
The error message throw when trying to compile the lines with fopen and fscanf are
./obj/edgelist.o: In function
loadEdgeArray': edgelist.c:(.text+0x148): undefined reference to
__isoc99_fscanf' ./obj/edgelist.o: In functionloadEdgeArrayInfo': edgelist.c:(.text+0x20c): undefined reference to
__isoc99_fscanf' collect2: ld returned 1 exit status make: *** [test] Error 1
This error is thrown when trying to compile from both from qemu as well as gem5.