Hi, I need to load two dynamic libraries and there is one function name confliction. So I use the the command "objcopy --redefine-sym add=new_add libmy_test.so libmy_test_new.so" to modify the symbol name.
But it still reports "Error: ./libmy_test_new.so: undefined symbol: new_add"
The following are my test codes.
void *lib_handle2 = dlopen("./libmy_test_new.so", RTLD_NOW);
if (NULL == lib_handle2) {
printf("Error: %s\n", dlerror());
goto err1;
}
fp_add f_add2 = dlsym(lib_handle2, "new_add");
if (NULL == f_add2) {
printf("Error: %s\n", dlerror());
goto err2;
}