On Wed, Jul 21, 2021, 11:48 AM gogineni kailashnath < gkailashnath1...@gmail.com> wrote:
> Hello, > > I have a C code, which creates a file *file.txt* and prints the hello > world content in the file. > > #include<stdio.h> > > int main () { > FILE *fp; > char str[] = "Hello world"; > > fp = fopen( "file.txt" , "w" ); > fwrite(str , 1 , sizeof(str) , fp ); > > fclose(fp); > > return(0); > } > > This binary is compiled in a static form My question is that, since I'm > using a gem5 simulator in syscall emulation mode. I'm working on linux > system. > > In the hardware level, since we only know the instructions, for example if > the binary has to open *file.txt*, how can I redirect it to open a > different file (say *hello.txt*, i.e., for any filename specified, it > should just trigger hello.txt). Any help would be appreciated. >
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s