VirtualBox

Changeset 14021

Show
Ignore:
Timestamp:
11/10/08 17:31:22 (2 months ago)
Author:
vboxsync
Message:

The VMMR0 template now uses the IPRT No-CRT stuff, as does RuntimeR0. Added nocrt strcpy and fixed completely busted aliases.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Config.kmk

    r14003 r14021  
    11661166 LIB_DDU         = $(PATH_BIN)/VBoxDDU.dll 
    11671167 LIB_SETTINGS    = $(PATH_BIN)/VBoxSett.dll 
    1168  OBJ_SYS0        = $(PATH_OBJ)/RuntimeR0/os2/sys0.obj 
     1168 VBOX_OBJ_SYS0   = $(PATH_OBJ)/RuntimeR0/os2/sys0.obj 
    11691169endif 
    11701170ifeq ($(KBUILD_TARGET),win) 
     
    19211921TEMPLATE_VBOXGC_LIBS                = \ 
    19221922        $(VBOX_GCC32_LIBGCC) \ 
    1923         $(OBJ_SYS0) \ 
     1923        $(VBOX_OBJ_SYS0) \ 
    19241924        end 
    19251925endif 
     
    19691969TEMPLATE_VBOXR0_ASTOOL              = $(VBOX_ASTOOL) 
    19701970TEMPLATE_VBOXR0_ASFLAGS             = $(VBOX_ASFLAGS) 
    1971 TEMPLATE_VBOXR0_DEFS                = IN_RING0 IN_RING0_AGNOSTIC $(ARCH_BITS_DEFS) 
     1971TEMPLATE_VBOXR0_DEFS                = IN_RING0 IN_RING0_AGNOSTIC IPRT_NO_CRT $(ARCH_BITS_DEFS) 
     1972TEMPLATE_VBOXR0_INCS                = $(PATH_ROOT)/include/iprt/nocrt 
    19721973 
    19731974ifeq ($(VBOX_LDR_FMT),pe) 
     
    19801981TEMPLATE_VBOXR0_CFLAGS              = $(TEMPLATE_VBOXR0_CXXFLAGS) 
    19811982TEMPLATE_VBOXR0_LDFLAGS             = -Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Exports -NoD 
    1982 ifdef VBOX_USE_VCC80 
    1983  TEMPLATE_VBOXR0_LIBS.x86           = \ 
     1983TEMPLATE_VBOXR0_LIBS.x86            = \ 
    19841984        $(PATH_SDK_W2K3DDKX86_LIB)/int64.lib 
    1985 else 
    1986  TEMPLATE_VBOXR0_LIBS.x86           = \ 
    1987         $(PATH_TOOL_VCC70_LIB)/libcmt.lib  # for 64-bit int 
    1988 endif 
    19891985endif # pe 
    19901986 
    19911987ifeq ($(VBOX_LDR_FMT),elf) 
    19921988TEMPLATE_VBOXR0_TOOL                = $(VBOX_GCC_TOOL) 
    1993 TEMPLATE_VBOXR0_CFLAGS              = -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) 
    1994 TEMPLATE_VBOXR0_CXXFLAGS            = -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) 
     1989TEMPLATE_VBOXR0_CFLAGS              = -nostdinc -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) 
     1990TEMPLATE_VBOXR0_CXXFLAGS            = -nostdinc -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) 
    19951991TEMPLATE_VBOXR0_CFLAGS.amd64        = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding 
    19961992TEMPLATE_VBOXR0_CXXFLAGS.amd64      = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables 
     
    20122008TEMPLATE_VBOXR0_TOOL                = GXX4MACHO 
    20132009TEMPLATE_VBOXR0_DEFS               += $(VBOX_DARWIN_DEF_SDK_DEFS) 
    2014 TEMPLATE_VBOXR0_CXXFLAGS            = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 
    2015 TEMPLATE_VBOXR0_CFLAGS              = $(VBOX_DARWIN_DEF_SDK_CFLAGS)   -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -fno-common -msoft-float -static -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 
     2010TEMPLATE_VBOXR0_CXXFLAGS            = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 
     2011TEMPLATE_VBOXR0_CFLAGS              = $(VBOX_DARWIN_DEF_SDK_CFLAGS)   -nostdinc -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -fno-common -msoft-float -static -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 
    20162012TEMPLATE_VBOXR0_LDFLAGS             = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)  -nostdlib 
    20172013#TEMPLATE_VBOXR0_LDFLAGS.release     = -Wl,-S ??? 
     
    20202016ifeq ($(VBOX_LDR_FMT),lx) 
    20212017TEMPLATE_VBOXR0_TOOL                = GXX3OMF 
    2022 TEMPLATE_VBOXR0_CFLAGS              = -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 
    2023 TEMPLATE_VBOXR0_CXXFLAGS            = -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 
    2024 TEMPLATE_VBOXR0_LDFLAGS             = -Zdll -nostdlib 
     2018TEMPLATE_VBOXR0_CFLAGS              = -nostdinc -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 
     2019TEMPLATE_VBOXR0_CXXFLAGS            = -nostdinc -g -pipe $(VBOX_GCC_PEDANTIC) $(VBOX_GCC_Wno-variadic-macros) -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 
     2020TEMPLATE_VBOXR0_LDFLAGS             = -nostdlib -Zdll 
    20252021TEMPLATE_VBOXR0_LIBS                = \ 
    20262022        $(VBOX_GCC_LIBGCC) \ 
    2027         $(OBJ_SYS0) \ 
     2023        $(VBOX_OBJ_SYS0) \ 
    20282024        end 
    20292025endif 
  • trunk/include/VBox/VBoxGuest.h

    r13578 r14021  
    10311031 
    10321032 
    1033 /** 
    1034  * VBoxGuest IOCTL codes and structures. 
     1033#if !defined(IN_RC) && !defined(IN_RING0_AGNOSTIC) && !defined(IPRT_NO_CRT) 
     1034/** @name VBoxGuest IOCTL codes and structures. 
    10351035 * 
    10361036 * The range 0..15 is for basic driver communication. 
     
    11721172#define VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS       VBOXGUEST_IOCTL_CODE(5, 0) 
    11731173 
    1174 /** 
    1175  * Result codes for VBoxGuestWaitEventInfo::u32Result 
     1174/** @name Result codes for VBoxGuestWaitEventInfo::u32Result 
    11761175 * @{ 
    11771176 */ 
     
    14781477 
    14791478/** @} */ 
     1479#endif /* !defined(IN_RC) && !defined(IN_RING0_AGNOSTIC) && !defined(IPRT_NO_CRT) */ 
    14801480 
    14811481 
  • trunk/include/iprt/asmdefs.mac

    r13832 r14021  
    603603%endif 
    604604 
     605;; @def RT_NOCRT_BEGINPROC 
     606; Starts a NOCRT procedure, taking care of name wrapping and aliasing. 
     607; 
     608; Aliasing (weak ones, if supported) will be created when RT_WITH_NOCRT_ALIASES 
     609; is defined and RT_WITHOUT_NOCRT_WRAPPERS isn't. 
     610; 
     611%macro RT_NOCRT_BEGINPROC 1 
     612%ifdef RT_WITH_NOCRT_ALIASES 
     613BEGINPROC RT_NOCRT(%1) 
     614%ifdef ASM_FORMAT_ELF 
     615global NAME(%1) 
     616weak NAME(%1) 
     617NAME(%1): 
     618%else 
     619GLOBALNAME %1 
     620%endif 
     621%else  ; !RT_WITH_NOCRT_ALIASES 
     622BEGINPROC RT_NOCRT(%1) 
     623%endif ; !RT_WITH_NOCRT_ALIASES 
     624%endmacro ; RT_NOCRT_BEGINPROC 
     625 
     626%ifdef RT_WITH_NOCRT_ALIASES 
     627 %ifdef RT_WITHOUT_NOCRT_WRAPPERS 
     628  %error "RT_WITH_NOCRT_ALIASES and RT_WITHOUT_NOCRT_WRAPPERS doesn't mix." 
     629 %endif 
     630%endif 
     631 
    605632 
    606633 
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp

    r13989 r14021  
    6464# include "../USB/DevEHCI.cpp" 
    6565#endif 
    66 #undef LOG_GROUP 
    67 #include "../VMMDev/VBoxDev.cpp" 
     66/*#undef LOG_GROUP 
     67#include "../VMMDev/VBoxDev.cpp"*/ 
    6868#undef LOG_GROUP 
    6969#include "../Parallel/DevParallel.cpp" 
  • trunk/src/VBox/Runtime/Makefile.kmk

    r13908 r14021  
    853853# 
    854854RuntimeR0_TEMPLATE      = VBOXR0 
    855 RuntimeR0_DEFS          = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPER
     855RuntimeR0_DEFS          = IN_RT_R0 RT_WITH_VBOX RT_WITH_NOCRT_ALIASE
    856856RuntimeR0_INCS          = include 
    857857RuntimeR0_SOURCES       = \ 
     
    870870        common/misc/sanity-c.c \ 
    871871        common/misc/sanity-cpp.cpp \ 
    872         common/string/memchr.cpp \ 
    873         common/string/memcmp.cpp \ 
    874         common/string/memcpy.cpp \ 
    875         common/string/memmove.asm \ 
    876         common/string/memset.cpp \ 
    877         common/string/strcmp.asm \ 
    878         common/string/strcpy.cpp \ 
    879872        common/string/strformat.cpp \ 
    880873        common/string/strformatrt.cpp \ 
    881874        common/string/strformattype.cpp \ 
    882         common/string/strlen.asm \ 
    883875        common/string/strncmp.cpp \ 
    884876        common/string/strpbrk.cpp \ 
     
    901893        VBox/strformat-vbox.cpp 
    902894 
    903 #if1of ($(KBUILD_TARGET_ARCH),amd64 x86) 
    904 # RuntimeR0_SOURCES += common/time/timesupA.asm 
    905 #else 
    906  RuntimeR0_SOURCES += common/time/timesupref.cpp 
    907 #endif 
    908  
    909 RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES) 
    910 RuntimeR0_SOURCES.win.x86   = $(RuntimeWin32ASM_SOURCES) 
    911  
    912 RuntimeR0_SOURCES.os2 =
    913         os2/RTErrConvertFromOS2.cpp
    914         os2/sys0.asm 
    915  
    916 ifeq ($(filter-out darwin solaris freebsd,$(KBUILD_TARGET)),
     895RuntimeR0_SOURCES += \ 
     896        common/misc/setjmp.asm \ 
     897        common/string/memchr.asm \ 
     898        common/string/memcmp.asm \ 
     899        common/string/memcpy.asm \ 
     900        common/string/mempcpy.asm \ 
     901        common/string/memmove.asm \ 
     902        common/string/memset.asm \ 
     903        common/string/strchr.asm \ 
     904       common/string/strcpy.asm
     905        common/string/strcmp.asm
     906        common/string/strlen.asm 
     907 
     908if1of ($(KBUILD_TARGET), darwin solaris freebsd
    917909RuntimeR0_SOURCES += \ 
    918910        common/math/gcc/adddi3.c \ 
     
    937929endif 
    938930 
    939  
    940 common/string/memchr.cpp_CXXFLAGS.win = -Oi- 
    941 common/string/memcmp.cpp_CXXFLAGS.win = -Oi- 
    942 common/string/memcpy.cpp_CXXFLAGS.win = -Oi- 
    943 common/string/memset.cpp_CXXFLAGS.win = -Oi- 
    944 common/string/strcpy.cpp_CXXFLAGS.win = -Oi- 
    945 common/string/strlen.cpp_CXXFLAGS.win = -Oi- 
     931#if1of ($(KBUILD_TARGET_ARCH),amd64 x86) 
     932# RuntimeR0_SOURCES += common/time/timesupA.asm 
     933#else 
     934 RuntimeR0_SOURCES += common/time/timesupref.cpp 
     935#endif 
     936 
     937RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES) 
     938RuntimeR0_SOURCES.win.x86   = $(RuntimeWin32ASM_SOURCES) 
     939 
     940RuntimeR0_SOURCES.os2 = \ 
     941        os2/RTErrConvertFromOS2.cpp \ 
     942        os2/sys0.asm 
     943 
    946944 
    947945# 
     
    14271425endif 
    14281426 
     1427# Only used in GC... 
     1428common/string/memchr.cpp_CXXFLAGS.win = -Oi- 
     1429common/string/memcmp.cpp_CXXFLAGS.win = -Oi- 
     1430common/string/memcpy.cpp_CXXFLAGS.win = -Oi- 
     1431common/string/memset.cpp_CXXFLAGS.win = -Oi- 
     1432common/string/strcpy.cpp_CXXFLAGS.win = -Oi- 
     1433common/string/strlen.cpp_CXXFLAGS.win = -Oi- 
     1434 
     1435 
    14291436 
    14301437# 
  • trunk/src/VBox/Runtime/common/string/memchr.asm

    r8256 r14021  
    3737; @param    ch      gcc: esi  msc: edx  x86:[esp+8] 
    3838; @param    cb      gcc: rdx  msc: r8   x86:[esp+0ch] 
    39 BEGINPROC RT_NOCRT(memchr) 
     39RT_NOCRT_BEGINPROC memchr 
    4040        cld 
    4141%ifdef RT_ARCH_AMD64 
  • trunk/src/VBox/Runtime/common/string/memcmp.asm

    r8256 r14021  
    3737; @param    pv2     gcc: rsi  msc: rdx  x86:[esp+8] 
    3838; @param    cb      gcc: rdx  msc: r8   x86:[esp+0ch] 
    39 BEGINPROC RT_NOCRT(memcmp) 
     39RT_NOCRT_BEGINPROC memcmp 
    4040        cld 
    4141        xor     eax, eax 
  • trunk/src/VBox/Runtime/common/string/memcpy.asm

    r8256 r14021  
    3737; @param    pvSrc   gcc: rsi  msc: rdx  x86:[esp+8] 
    3838; @param    cb      gcc: rdx  msc: r8   x86:[esp+0ch] 
    39 BEGINPROC RT_NOCRT(memcpy) 
     39RT_NOCRT_BEGINPROC memcpy 
    4040        cld 
    4141 
  • trunk/src/VBox/Runtime/common/string/memmove.asm

    r8256 r14021  
    3737; @param    pvSrc   gcc: rsi  msc: rdx  x86:[esp+8] 
    3838; @param    cb      gcc: rdx  msc: r8   x86:[esp+0ch] 
    39 BEGINPROC RT_NOCRT(memmove) 
     39RT_NOCRT_BEGINPROC memmove 
    4040        ; Prolog. 
    4141%ifdef RT_ARCH_AMD64 
  • trunk/src/VBox/Runtime/common/string/mempcpy.asm

    r8256 r14021  
    3737; @param    pvSrc   gcc: rsi  msc: rdx  x86:[esp+8] 
    3838; @param    cb      gcc: rdx  msc: r8   x86:[esp+0ch] 
    39 BEGINPROC RT_NOCRT(mempcpy) 
     39RT_NOCRT_BEGINPROC mempcpy 
    4040        cld                             ; paranoia 
    4141 
  • trunk/src/VBox/Runtime/common/string/memset.asm

    r8256 r14021  
    3737; @param    ch      gcc: esi  msc: edx  x86:[esp+8] 
    3838; @param    cb      gcc: rdx  msc: r8   x86:[esp+0ch] 
    39 BEGINPROC RT_NOCRT(memset) 
     39RT_NOCRT_BEGINPROC memset 
    4040        cld 
    4141%ifdef RT_ARCH_AMD64 
  • trunk/src/VBox/Runtime/common/string/strchr.asm

    r8256 r14021  
    3636; @param    psz     gcc: rdi  msc: rcx  x86:[esp+4] 
    3737; @param    ch      gcc: esi  msc: edx  x86:[esp+8] 
    38 BEGINPROC RT_NOCRT(strchr) 
     38RT_NOCRT_BEGINPROC strchr 
    3939        cld 
    4040 
  • trunk/src/VBox/Runtime/common/string/strcmp.asm

    r14017 r14021  
    3636; @param    psz1   gcc: rdi  msc: rcx  x86:[esp+4] 
    3737; @param    psz2   gcc: rsi  msc: rdx  x86:[esp+8] 
    38 BEGINPROC RT_NOCRT(strcmp) 
     38RT_NOCRT_BEGINPROC strcmp 
    3939        ; input 
    4040%ifdef RT_ARCH_AMD64 
  • trunk/src/VBox/Runtime/common/string/strcpy.asm

    r8256 r14021  
    11; $Id$ 
    22;; @file 
    3 ; IPRT - No-CRT strcmp - AMD64 & X86. 
     3; IPRT - No-CRT strcpy - AMD64 & X86. 
    44; 
    55 
     
    3636; @param    psz1   gcc: rdi  msc: rcx  x86:[esp+4] 
    3737; @param    psz2   gcc: rsi  msc: rdx  x86:[esp+8] 
    38 BEGINPROC RT_NOCRT(strcmp) 
     38RT_NOCRT_BEGINPROC strcpy 
    3939        ; input 
    4040%ifdef RT_ARCH_AMD64 
     
    4646  %define psz2 rsi 
    4747 %endif 
     48        mov     r8, psz1 
    4849%else 
    4950        mov     ecx, [esp + 4] 
     
    5152  %define psz1 ecx 
    5253  %define psz2 edx 
     54        push    psz1 
    5355%endif 
    5456 
     
    5860.next: 
    5961        mov     al, [psz1] 
    60         mov     ah, [psz2] 
    61         cmp     al, ah 
    62         jne     .not_equal 
     62        mov     [psz2], al 
    6363        test    al, al 
    64         jz      .equal 
     64        jz      .done 
    6565 
    6666        mov     al, [psz1 + 1] 
    67         mov     ah, [psz2 + 1] 
    68         cmp     al, ah 
    69         jne     .not_equal 
     67        mov     [psz2 + 1], al 
    7068        test    al, al 
    71         jz      .equal 
    72         inc     psz1 
    73         inc     psz2 
     69        jz      .done 
    7470 
    7571        mov     al, [psz1 + 2] 
    76         mov     ah, [psz2 + 2] 
    77         cmp     al, ah 
    78         jne     .not_equal 
     72        mov     [psz2 + 2], al 
    7973        test    al, al 
    80         jz      .equal 
    81         inc     psz1 
    82         inc     psz2 
     74        jz      .done 
    8375 
    8476        mov     al, [psz1 + 3] 
    85         mov     ah, [psz2 + 3] 
    86         cmp     al, ah 
    87         jne     .not_equal 
     77        mov     [psz2 + 3], al 
    8878        test    al, al 
    89         jz      .equal 
     79        jz      .done 
    9080 
    9181        add     psz1, 4 
     
    9383        jmp     .next 
    9484 
    95 .equal: 
    96         xor     eax, eax 
     85.done: 
     86%ifdef RT_ARCH_AMD64 
     87        mov     rax, r8 
     88%else 
     89        pop     eax 
     90%endif 
    9791        ret 
     92ENDPROC RT_NOCRT(strcpy) 
    9893 
    99 .not_equal: 
    100         movzx   ecx, ah 
    101         and     eax, 0ffh 
    102         sub     eax, ecx 
    103         ret 
    104 ENDPROC RT_NOCRT(strcmp) 
    105  
  • trunk/src/VBox/Runtime/common/string/strcpy_alias.c

    r8245 r14021  
    11/* $Id$ */ 
    22/** @file 
    3  * IPRT - No-CRT strcmp() alias for gcc. 
     3 * IPRT - No-CRT strcpy() alias for gcc. 
    44 */ 
    55 
     
    3434*******************************************************************************/ 
    3535#include <iprt/nocrt/string.h> 
    36 #undef strcmp 
     36#undef strcpy 
    3737 
    3838#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) 
    3939# ifndef __MINGW32__ 
    40 #  pragma weak strcmp 
     40#  pragma weak strcpy 
    4141# endif 
    4242 
    4343/* No alias support here (yet in the ming case). */ 
    44 extern int (strcmp)(const char *psz1, const char *psz2) 
     44extern char * (strcpy)(char *psz1, const char *psz2) 
    4545{ 
    46     return RT_NOCRT(strcmp)(psz1, psz2); 
     46    return RT_NOCRT(strcpy)(psz1, psz2); 
    4747} 
    4848 
    4949#elif __GNUC__ >= 4 
    5050/* create a weak alias. */ 
    51 __asm__(".weak strcmp\t\n" 
    52         " .set strcmp," RT_NOCRT_STR(strcmp) "\t\n"); 
     51__asm__(".weak strcpy\t\n" 
     52        " .set strcpy," RT_NOCRT_STR(strcpy) "\t\n" 
     53        ".global strcpy\t\n" 
     54        ); 
    5355#else 
    5456/* create a weak alias. */ 
    55 extern __typeof(RT_NOCRT(strcmp)) strcmp __attribute__((weak, alias(RT_NOCRT_STR(strcmp)))); 
     57extern __typeof(RT_NOCRT(strcpy)) strcpy __attribute__((weak, alias(RT_NOCRT_STR(strcpy)))); 
    5658#endif 
    5759 
  • trunk/src/VBox/Runtime/common/string/strlen.asm

    r9502 r14021  
    3535;; 
    3636; @param    psz     gcc: rdi  msc: rcx  x86: [esp+4] 
    37 BEGINPROC RT_NOCRT(strlen) 
     37RT_NOCRT_BEGINPROC strlen 
    3838        cld 
    3939%ifdef RT_ARCH_AMD64 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy