🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6405

structure assignments in gcc

#6405
From: Tom Markson
Date: Sun, 26 Nov 1995 00:00
19 lines
1208 bytes
Hi,

Under SVR4 operating systems, the bcopy function is only in backwater 
libraries.  So, the compiler is setup to do memcpys.  However, there
is no memcpy in the kernel.  So, if you use structure assigns in kernel
modules, gcc will generate the memcpys, which the kernel will be unable
to resolve.  

It would be nice if there was an option in gcc to warn about struct 
assignments since it is very hard to track these down in the code.  Basically,
you end up do an nm on the module and trying to find these by hand until
the nm shows that memcpy is no longer present.  Or you can do what I did
which is to compile a seperate version of the compiler "kgcc" which will
generate bcopys.  However, it is hard to distribute source code which does
uses kgcc.

Thanks

--tom
Technical Details
Message-ID: <9511270134.AA12795@monster.incog.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,bc3b8006477b4cb4,start
X-Google-Attributes: gid113d02,public
From: markson@osmosys.incog.com (Tom Markson)
Subject: structure assignments in gcc
Date: 1995/11/26
Message-ID: <9511270134.AA12795@monster.incog.com>
X-Deja-AN: 120166871
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
newsgroups: gnu.gcc.bug