I test now to write own strcat.I add that in 100d lib.c
char * strcat( char *dst, char *src)
{
long offset = strlen(dst);
strcpy(dst+offset, src);
return dst;
}
I see then in new build stubs_entry.s too a entry strcat which is wrong.
also give linker error, because in wrapper.c is too this.
char *strcat(char *dest, const char *app) {
return _strcat(dest, app);
}
so it seem cant work without change of common chdk file.
thats error i get
./platform/ixus1000_sd4500/sub/100d/libplatformsub.a(lib.o): In function `strcat':
lib.c:(.text+0x0): multiple definition of `strcat'
../platform/ixus1000_sd4500/libplatform.a(wrappers.o):wrappers.c:(.text+0x51c): first defined here
E:\chdk\gcc\bin\..\lib\gcc\arm-elf\3.4.6\..\..\..\..\arm-elf\bin\ld.exe: Warning: size of symbol `strcat' changed from 24 in ../platform/ixus1000_sd4500/libplatform.a(wrappers.o) to 48 in ../platform/ixus1000_sd4500/sub/100d/libplatformsub.a(lib.o)
collect2: ld returned 1 exit status
E:\chdk\gcc\bin\gmake.exe[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1
Edit:
I download the S95 sources, and S95 have same problem as IX1000
addresses of code are same.
thats from the S95 source
NSTUB(strcat, 0xff81402c)
// Best match: 56%
NSTUB(strchr, 0xff8140b4)
NSTUB(strcmp, 0xff82069c)
NSTUB(strcpy, 0xff820684)
NSTUB(strftime, 0xff8b8660)
// Best match: 79%
NSTUB(strlen, 0xff8206bc)
NSTUB(strncmp, 0xff814068)
// Best match: 73%
NSTUB(strncpy, 0xff81402c)
// Best match: 71%