strlen
This commit is contained in:
parent
62fbcfefec
commit
9e1719c165
3 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
build/obj/0.o
|
||||
build/obj/sdk/msl/runtime/__mem.o
|
||||
build/obj/sdk/trk/__exception.o
|
||||
build/obj/2.o
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.init start,.init end,extab start,extab end,extabindex start,extabindex end,.text start,.text end,.ctors start,.ctors end,.dtors start,.dtors end,.rodata start,.rodata end,.data start,.data end,.bss start,.bss end,.sdata start,.sdata end,.sbss start,.sbss end,.sdata2 start,.sdata2 end,.sbss2 start,.sbss2 end,File
|
||||
80004000,80004380,,,,,,,,,,,,,,,,,,,,,,,,,sdk/msl/runtime/__mem.o
|
||||
80004000,80004380,,,,,80006a8c,80006aa8,,,,,,,,,,,,,,,,,,,sdk/msl/runtime/__mem.o
|
||||
80004380,800062c0,,,,,,,,,,,,,,,,,,,,,,,,,sdk/trk/__exception.o
|
||||
,,,,,,8001a0b0,8001a2c0,,,,,,,80421da0,80421dd7,,,,,,,,,,,sdk/rvl/base/PPCArch.o
|
||||
,,,,,,8001b670,8001b6c4,,,,,,,,,,,,,,,,,,,sdk/rvl/os/OS.o
|
||||
|
|
|
|
@ -263,3 +263,12 @@ __declspec(section ".init") void *memset(void *dest, int val, size_t count) {
|
|||
__fill_mem(dest, val, count);
|
||||
return dest;
|
||||
}
|
||||
|
||||
size_t strlen(const char *s) {
|
||||
unsigned char *p = (unsigned char *)s - 1;
|
||||
size_t n = ~0;
|
||||
do {
|
||||
n++;
|
||||
} while (*++p);
|
||||
return n;
|
||||
}
|
Loading…
Reference in a new issue