Closed fuxinyuan1998 closed 1 year ago
and I get an error which is make[2]: Circular libriscv.so <- libriscv.so dependency dropped.
when I turn on the difftest option.
when I excute 'make run', the program has been excuted successfully. but when I debug it, the program will trigger the assertion of 'dlopen', and I have no idea about this. Could you give me some tips or hints?
Does ref_so_file
exist? If not, please try to check why. The Makefile
s should contain rules to build ref_so_file
.
For the width
parameter, it is used in x86. So you can ignore it in riscv64.
I believe I am sure the file exits and the path is right and I write a program to test it. the test open it successfully but it cant work in nemu. here is the program.
`#include
typedef int (*CAC_FUNC)(int, int);
int main() { void handle; char error; CAC_FUNC cac_func = NULL; handle = dlopen(LIB_CALCULATE_PATH, RTLD_LAZY); if(!handle){ fprintf(stderr, "%s\n", dlerror()); exit(EXIT_FAILURE); }else{ printf("successfull!\n"); } assert(handle); }`
What does dlerror()
report in NEMU?
when I debug it with gdb, the handle gets 0x0 and dlerror
report "no such file or directory"
but when I excute make run
, there is nothing wrong happend but the "difftest" function has not been implemented
According to the message reported by dlerror()
, it seems that there is a trailing space in the ref_so_file
string. You may remove it and retry.
Thank you pretty much and I solve it. Thank you for your reply again Dr.
I have a question about the difftest in the file src/isa/riscv64/local-include/reg.h
static inline const char* reg_name(int idx, int width) { extern const char* regs[]; return regs[check_reg_idx(idx)]; }
why there is a parameter 'width' not used