Re: problem with dlsym to fetch address of some functions

2014-09-23 Thread Paulo César Pereira de Andrade
2014-09-23 16:40 GMT-03:00 Marco Atzeri : > On 23/09/2014 20:43, Paulo César Pereira de Andrade wrote: >> >>Hi, >> >>Forgive me if this is expected. I am probably abusing dlsym >> behavior on other systems. > > > It will be much more clear if

problem with dlsym to fetch address of some functions

2014-09-23 Thread Paulo César Pereira de Andrade
Hi, Forgive me if this is expected. I am probably abusing dlsym behavior on other systems. (gdb) p sprintf $1 = {} 0x10044b300 (gdb) p (void*)dlsym(NULL, "sprintf") $2 = (void *) 0x7708a738 The test driver I use for http://www.gnu.org/software/lightning calls dlsym in its pseudo assemble

ffs problem in windows64

2014-09-23 Thread Paulo César Pereira de Andrade
Hi, I am almost done porting https://savannah.gnu.org/projects/lightning to cygwin and windows64 abi. But I found a problem with the ffs function. The test case is simple: $ cat x.c extern int ffs(int); int main(void) { long l = 0x8000; int i = ffs((int)l); return 0; } $ gcc -O0 -g3 x