[ECOS] Redboot and builtin functions

Fabrice Gautier Fabrice_Gautier@sdesigns.com
Thu Oct 19 01:52:00 GMT 2000


Hi,

About builtins functions, memcpy, memset ...

I've seen that memset and memcpy are defined and implemented in multiple
places.

One of this place is generic-stub.c where a comment says that the stub can't
use the same memcpy and memset than the rest (I can't see really why but why
not..) 

Another place is the libc (the string part to be more precise) where they
are implemented with a weak attribute.

Last place I saw is in redboot, but only for memset, memcpy is not implemted
here... (why almost all the strings functions but memcpy?)

And there is the builtins too.

So there are 4 implementations, but the one in redboot does not have the
same declarations than the one in  the eCos libc. I do not know for sure
what the builtins declaration is (is there an include file for the
builtins?) but I think they conform to the ISO standard, and so I guess are
the same as the eCos libc. 

So, a few questions:

1/ Do the builtins are intented to be used at all in eCos? (if not, it lacks
a -fno-builtin in the 386 target)
2/ Why RedBoot doesn't/can't use the string functions defined in the libc ?
Or the the builtins ?
3/ Which memcpy/memset the common ethernet support and ethernet drivers are
supposed to use ?
4/ When builtins are used by gcc, when does it use the user-defined version
of memcpy/memset ?

Thanks

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 







> -----Original Message-----
> From: Fabrice Gautier [ mailto:Fabrice_Gautier@sdesigns.com ]
> Sent: Wednesday, October 18, 2000 11:24 AM
> To: Ecos-List (E-mail)
> Subject: [ECOS] Redboot and builtin functions
> 
> 
> Hi,
> 
> WHen building redboot I've the followings warnings:
> 
> packages/redboot/current/src/misc_funs.c:69: warning: 
> conflicting types for
> built-in function `strcpy'
> packages/redboot/current/src/misc_funs.c:127: warning: 
> conflicting types for
> built-in function `memcmp'
> packages/redboot/current/src/misc_funs.c:138: warning: 
> conflicting types for
> built-in function `memset'
> 
> I can get rid of them if I build with -fno-builtin, but then i've some
> "implicit declaration" warnings.
> 
> Thanks,
> 
> -- 
> Fabrice Gautier
> fabrice_gautier@sdesigns.com 
> 


More information about the Ecos-discuss mailing list