Date: Thu, 22 Jan 2009 00:44:23 +0100 From: Dimitry Andric <dimitry@andric.com> To: Andrew Brampton <brampton+freebsd-hackers@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel Module - GCC Requires memmove Message-ID: <4977B357.2080500@andric.com> In-Reply-To: <d41814900901210412h4a1aaec6l6945dd79d07d13be@mail.gmail.com> References: <d41814900901210412h4a1aaec6l6945dd79d07d13be@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On 2009-01-21 13:12, Andrew Brampton wrote:
> The .ii file (post-processed source) did NOT mention memmove at all.
> So I found it very odd that an undefined symbol existed in the object
> file. So then I looked in the .s file (asm), and it was clearing
> making a single call to memmove.
This can (amongst others) occur if you assign structs, e.g.:
int test(void)
{
struct foo {
char bar[100];
} a, b;
b = a;
}
Compile this with gcc -O0 -S, and you'll see it generates a call to
memcpy().
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4977B357.2080500>
