1 .cpu arm7tdmi 2 .fpu softvfp 3 .eabi_attribute 20, 1 4 .eabi_attribute 21, 1 5 .eabi_attribute 23, 3 6 .eabi_attribute 24, 1 7 .eabi_attribute 25, 1 8 .eabi_attribute 26, 1 9 .eabi_attribute 30, 4 10 .eabi_attribute 18, 4 11 .file "string.c" 19 .Ltext0: 20 .cfi_sections .debug_frame 21 .align 2 22 .global strnlen 24 strnlen: 25 .LFB2: 26 .file 1 "lib/string.c" 1:lib/string.c **** /* 2:lib/string.c **** * linux/lib/string.c 3:lib/string.c **** * 4:lib/string.c **** * Copyright (C) 1991, 1992 Linus Torvalds 5:lib/string.c **** */ 6:lib/string.c **** 7:lib/string.c **** /* 8:lib/string.c **** * stupid library routines.. The optimized versions should generally be found 9:lib/string.c **** * as inline code in 10:lib/string.c **** * 11:lib/string.c **** * These are buggy as well.. 12:lib/string.c **** * 13:lib/string.c **** * * Fri Jun 25 1999, Ingo Oeser 14:lib/string.c **** * - Added strsep() which will replace strtok() soon (because strsep() is 15:lib/string.c **** * reentrant and should be faster). Use only strsep() in new code, please. 16:lib/string.c **** * 17:lib/string.c **** * * Sat Feb 09 2002, Jason Thomas , 18:lib/string.c **** * Matthew Hawkins 19:lib/string.c **** * - Kissed strtok() goodbye 20:lib/string.c **** */ 21:lib/string.c **** 22:lib/string.c **** #include 23:lib/string.c **** #include 24:lib/string.c **** #include 25:lib/string.c **** 26:lib/string.c **** 27:lib/string.c **** #ifndef __HAVE_ARCH_STRNLEN 28:lib/string.c **** /** 29:lib/string.c **** * strnlen - Find the length of a length-limited string 30:lib/string.c **** * @s: The string to be sized 31:lib/string.c **** * @count: The maximum number of bytes to search 32:lib/string.c **** */ 33:lib/string.c **** size_t strnlen(const char *s, size_t count) 34:lib/string.c **** { 27 .loc 1 34 0 28 .cfi_startproc 29 @ Function supports interworking. 30 @ args = 0, pretend = 0, frame = 0 31 @ frame_needed = 0, uses_anonymous_args = 0 32 @ link register save eliminated. 33 .LVL0: 34 .loc 1 34 0 35 0000 0030A0E1 mov r3, r0 36 .LVL1: 37 .L3: 35:lib/string.c **** const char *sc; 36:lib/string.c **** 37:lib/string.c **** for (sc = s; count-- && *sc != '\0'; ++sc) 38 .loc 1 37 0 discriminator 1 39 0004 011051E2 subs r1, r1, #1 40 0008 0320A0E1 mov r2, r3 41 .LVL2: 42 000c 0200003A bcc .L2 43 .loc 1 37 0 is_stmt 0 discriminator 2 44 0010 01C0D3E4 ldrb ip, [r3], #1 @ zero_extendqisi2 45 .LVL3: 46 0014 00005CE3 cmp ip, #0 47 0018 F9FFFF1A bne .L3 48 .L2: 38:lib/string.c **** /* nothing */; 39:lib/string.c **** return sc - s; 40:lib/string.c **** } 49 .loc 1 40 0 is_stmt 1 50 001c 020060E0 rsb r0, r0, r2 51 .LVL4: 52 0020 1EFF2FE1 bx lr 53 .cfi_endproc 54 .LFE2: 56 .Letext0: DEFINED SYMBOLS *ABS*:00000000 string.c C:\Users\netz\AppData\Local\Temp\cc4Ne3c1.s:21 .text:00000000 $a C:\Users\netz\AppData\Local\Temp\cc4Ne3c1.s:24 .text:00000000 strnlen .debug_frame:00000010 $d NO UNDEFINED SYMBOLS