Subject: vax-current kernel: undefined reference to `memcpy'
To: None <port-vax@netbsd.org, current-users@netbsd.org>
From: Rhialto <rhialto@azenomei.knuffel.net>
List: current-users
Date: 06/07/2004 02:12:18
While building a custom kernel for the VAX, I came across undefined
references to memcpy and memset, from bf_skey.o and sha2.o.
Looking through definitions for memcpy I found various things that might
be relevant. Apparently none of these kick in.
lib/libkern/bcopy.c:66
/*
* Copy a block of memory, handling overlap.
* This is the routine that actually implements
* (the portable versions of) bcopy, memcpy, and memmove.
*/
#ifdef MEMCOPY
void *
memcpy(dst0, src0, length)
#else
#ifdef MEMMOVE
void *
memmove(dst0, src0, length)
#else
void
bcopy(src0, dst0, length)
#endif
#endif
void *dst0;
const void *src0;
size_t length;
{
lib/libkern/libkern.h:233 (VAX uses gcc version 2.95.3 20010315 (release)
(NetBSD nb4))
/* Prototypes for which GCC built-ins exist. */
void *memcpy __P((void *, const void *, size_t));
int memcmp __P((const void *, const void *, size_t));
void *memset __P((void *, int, size_t));
#if __GNUC_PREREQ__(2, 95) && !defined(__vax__)
#define memcpy(d, s, l) __builtin_memcpy(d, s, l)
#define memcmp(a, b, l) __builtin_memcmp(a, b, l)
#define memset(d, v, l) __builtin_memset(d, v, l)
#endif
lib/libsa/memcpy.c:41
void *
memcpy(s1, s2, n)
void *s1;
const void *s2;
size_t n;
{
arch/vax/include/macros.h:77
static __inline__ void * __attribute__((__unused__))
memcpy(void *to, const void *from, size_t len)
{
-Olaf.
--
___ Olaf 'Rhialto' Seibert
\X/ rhialto/at/xs4all.nl -- Cetero censeo "authored" delendum esse.