[quote]
[color=blue][b]eve@eve:~/squashfs-root$ sudo chroot . ./qemu-arm -E LD_PRELOAD="/nvram.so" usr/sbin/httpd [/b][/color]
usr/sbin/httpd: relocation error: /nvram.so: symbol __register_frame_info, version GLIBC_2.0 not defined in file libgcc_s.so.1 with link time reference
eve@eve:~/squashfs-root$
[/quote]
[quote]
#include <stdio.h>
#include <string.h>
[color=darkblue][b]void __register_frame_info(void) { }
void __deregister_frame_info(void) { }
void __unregister_frame_info(void) { }
[/b][/color]
char *nvram_get(char *key)
{
char *value = NULL;
if(strcmp(key, "lan_ipaddr") == 0)
{
value = strdup("127.0.0.1");
}
if(strcmp(key, "lan_proto") == 0)
{
value = strdup("static");
}
printf("nvram_get(%s) == %s\n", key, value);
return value;
}
[/quote]
[b][color=blue][quote]chroot . ./qemu-arm -E LD_PRELOAD="/nvram.so" usr/sbin/httpd [/quote][/color][/b]
[color=blue][b]eve@eve:~/squashfs-root$ sudo chroot . ./qemu-arm -E LD_PRELOAD="/nvram.so" usr/sbin/httpd [/b][/color]
usr/sbin/httpd: relocation error: /nvram.so: symbol __register_frame_info, version GLIBC_2.0 not defined in file libgcc_s.so.1 with link time reference
eve@eve:~/squashfs-root$
[/quote]
[quote]
#include <stdio.h>
#include <string.h>
[color=darkblue][b]void __register_frame_info(void) { }
void __deregister_frame_info(void) { }
void __unregister_frame_info(void) { }
[/b][/color]
char *nvram_get(char *key)
{
char *value = NULL;
if(strcmp(key, "lan_ipaddr") == 0)
{
value = strdup("127.0.0.1");
}
if(strcmp(key, "lan_proto") == 0)
{
value = strdup("static");
}
printf("nvram_get(%s) == %s\n", key, value);
return value;
}
[/quote]
[b][color=blue][quote]chroot . ./qemu-arm -E LD_PRELOAD="/nvram.so" usr/sbin/httpd [/quote][/color][/b]