• Rodrigo Campos's avatar
    tools/nolibc/string: export strlen() · 689230b6
    Rodrigo Campos authored
    As with commit 8d304a37
    
    , "tools/nolibc/string: export memset() and
    memmove()", gcc -Os without -ffreestanding may fail to compile with:
    
    	cc -fno-asynchronous-unwind-tables -fno-ident -s -Os -nostdlib -lgcc  -static -o test test.c
    	/usr/bin/ld: /tmp/cccIasKL.o: in function `main':
    	test.c:(.text.startup+0x1e): undefined reference to `strlen'
    	collect2: error: ld returned 1 exit status
    
    As on the aforementioned commit, this patch adds a section to export
    this function so compilation works on those cases too.
    Signed-off-by: default avatarRodrigo Campos <rodrigo@sdfg.com.ar>
    Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
    689230b6
string.h 5.12 KB