* Unresolved symbol memset
@ 2001-12-05 18:18 Michael Smith
2001-12-05 18:26 ` rddunlap
2001-12-05 18:40 ` John Levon
0 siblings, 2 replies; 12+ messages in thread
From: Michael Smith @ 2001-12-05 18:18 UTC (permalink / raw)
To: linux-kernel
Hello all,
I am new the Linux world and have a problem which is somewhat
confusing. I am using the system call memset() in kernel code written
for Red Hat 7.1(kernel 2.4). I needed to make this code compatible with
Red Hat 6.2(kernel 2.2) and seem to be getting a unresolved symbol.
This is only happening in one place of the code in one file. I am using
memset() in other areas of the code which does not lead to the problem.
If anyone can clue me in to what this possible can be, it would greatly
be appreciated.
Thank you in advance,
Michael
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Unresolved symbol memset 2001-12-05 18:18 Unresolved symbol memset Michael Smith @ 2001-12-05 18:26 ` rddunlap 2001-12-05 18:55 ` Michael Smith 2001-12-05 18:40 ` John Levon 1 sibling, 1 reply; 12+ messages in thread From: rddunlap @ 2001-12-05 18:26 UTC (permalink / raw) To: Michael Smith; +Cc: linux-kernel On Wed, 5 Dec 2001, Michael Smith wrote: | Hello all, | I am new the Linux world and have a problem which is somewhat | confusing. I am using the system call memset() in kernel code written | for Red Hat 7.1(kernel 2.4). I needed to make this code compatible with | Red Hat 6.2(kernel 2.2) and seem to be getting a unresolved symbol. | This is only happening in one place of the code in one file. I am using | memset() in other areas of the code which does not lead to the problem. | If anyone can clue me in to what this possible can be, it would greatly | be appreciated. um, memset() isn't actually a system call. However-- does the problem source file have #include <linux/string.h> in it? It should. Or perhaps you could post the problem source file and/or gcc messages. -- ~Randy ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Unresolved symbol memset 2001-12-05 18:26 ` rddunlap @ 2001-12-05 18:55 ` Michael Smith 2001-12-05 18:57 ` rddunlap ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Michael Smith @ 2001-12-05 18:55 UTC (permalink / raw) To: rddunlap; +Cc: linux-kernel That particular header is included. As I mentioned, I am using memset in other areas of the code, as well as the same file. If I take this one call out of the source, it compiles, links and I am able to perform and insmod correctly. Below are the headers that are included in the file, and the area of the code that is causing the problem. Let me say that the code, even with this particular call in, compiles and links. The problem happens when I go to perform the insmod on it. #include <memory.h> #include <string.h> #include "myownheaders.h" void myfunction( void *a, int len ) { .... Mymemmove() //used because NdisMoveMemory can not be used memset( &a->WORD[NUMWORDS-len], 0, len*4); ... } -----Original Message----- From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of rddunlap@osdl.org Sent: Wednesday, December 05, 2001 1:27 PM To: Michael Smith Cc: linux-kernel@vger.kernel.org Subject: Re: Unresolved symbol memset On Wed, 5 Dec 2001, Michael Smith wrote: | Hello all, | I am new the Linux world and have a problem which is somewhat | confusing. I am using the system call memset() in kernel code written | for Red Hat 7.1(kernel 2.4). I needed to make this code compatible with | Red Hat 6.2(kernel 2.2) and seem to be getting a unresolved symbol. | This is only happening in one place of the code in one file. I am using | memset() in other areas of the code which does not lead to the problem. | If anyone can clue me in to what this possible can be, it would greatly | be appreciated. um, memset() isn't actually a system call. However-- does the problem source file have #include <linux/string.h> in it? It should. Or perhaps you could post the problem source file and/or gcc messages. -- ~Randy - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Unresolved symbol memset 2001-12-05 18:55 ` Michael Smith @ 2001-12-05 18:57 ` rddunlap 2001-12-05 19:16 ` Tommy Reynolds 2001-12-05 19:34 ` Charles Cazabon 2 siblings, 0 replies; 12+ messages in thread From: rddunlap @ 2001-12-05 18:57 UTC (permalink / raw) To: Michael Smith; +Cc: linux-kernel Are you compiling with "-O2" (as mentioned by someone else) ? ~Randy On Wed, 5 Dec 2001, Michael Smith wrote: | That particular header is included. As I mentioned, I am using memset | in other areas of the code, as well as the same file. If I take this | one call out of the source, it compiles, links and I am able to perform | and insmod correctly. Below are the headers that are included in the | file, and the area of the code that is causing the problem. Let me say | that the code, even with this particular call in, compiles and links. | The problem happens when I go to perform the insmod on it. | | #include <memory.h> | #include <string.h> | #include "myownheaders.h" | | | void myfunction( void *a, int len ) | { | .... | Mymemmove() //used because NdisMoveMemory can not be used | memset( &a->WORD[NUMWORDS-len], 0, len*4); | ... | } | | | -----Original Message----- | From: linux-kernel-owner@vger.kernel.org | [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of | rddunlap@osdl.org | Sent: Wednesday, December 05, 2001 1:27 PM | To: Michael Smith | Cc: linux-kernel@vger.kernel.org | Subject: Re: Unresolved symbol memset | | On Wed, 5 Dec 2001, Michael Smith wrote: | | | Hello all, | | I am new the Linux world and have a problem which is somewhat | | confusing. I am using the system call memset() in kernel code written | | for Red Hat 7.1(kernel 2.4). I needed to make this code compatible | with | | Red Hat 6.2(kernel 2.2) and seem to be getting a unresolved symbol. | | This is only happening in one place of the code in one file. I am | using | | memset() in other areas of the code which does not lead to the | problem. | | If anyone can clue me in to what this possible can be, it would | greatly | | be appreciated. | | um, memset() isn't actually a system call. | However-- does the problem source file have | #include <linux/string.h> | in it? It should. | Or perhaps you could post the problem source file and/or | gcc messages. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Unresolved symbol memset 2001-12-05 18:55 ` Michael Smith 2001-12-05 18:57 ` rddunlap @ 2001-12-05 19:16 ` Tommy Reynolds 2001-12-05 19:35 ` Michael Smith 2001-12-05 19:34 ` Charles Cazabon 2 siblings, 1 reply; 12+ messages in thread From: Tommy Reynolds @ 2001-12-05 19:16 UTC (permalink / raw) To: Michael Smith; +Cc: linux-kernel [-- Attachment #1: Type: text/plain, Size: 1512 bytes --] More important activities lacking, "Michael Smith" <smithmg@agere.com> wrote: > That particular header is included. As I mentioned, I am using memset > in other areas of the code, as well as the same file. If I take this > one call out of the source, it compiles, links and I am able to perform > and insmod correctly. Below are the headers that are included in the > file, and the area of the code that is causing the problem. Let me say > that the code, even with this particular call in, compiles and links. > The problem happens when I go to perform the insmod on it. > > #include <memory.h> > #include <string.h> > #include "myownheaders.h" > > > void myfunction( void *a, int len ) > { > .... > Mymemmove() //used because NdisMoveMemory can not be used > memset( &a->WORD[NUMWORDS-len], 0, len*4); > ... > } Inside a driver (or module) file, any include reference that doesn't begin with either <linux/foo.h> or <asm/foo.h> should always raise a red flag. There are user-land header files ("/usr/include") and kernel header files ("/usr/src/linux/include") and never the twain shall meet. Mixing includes is always a bad idea. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + -- -- -- -- -- -- -- -- -- -- Tommy Reynolds | mailto: <reynolds@redhat.com> Red Hat, Inc., Embedded Development Services | Phone: +1.256.704.9286 307 Wynn Drive NW, Huntsville, AL 35805 USA | FAX: +1.256.837.3839 Senior Software Developer | Mobile: +1.919.641.2923 [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Unresolved symbol memset 2001-12-05 19:16 ` Tommy Reynolds @ 2001-12-05 19:35 ` Michael Smith 0 siblings, 0 replies; 12+ messages in thread From: Michael Smith @ 2001-12-05 19:35 UTC (permalink / raw) To: 'Tommy Reynolds'; +Cc: linux-kernel Taking your advice I removed the header memory.h and switched the include for string.h to be linux/string.h. This seemed to fix the problem. I thank you all for your input and appreciate the time you all took Michael -----Original Message----- From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Tommy Reynolds Sent: Wednesday, December 05, 2001 2:17 PM To: Michael Smith Cc: linux-kernel@vger.kernel.org Subject: Re: Unresolved symbol memset More important activities lacking, "Michael Smith" <smithmg@agere.com> wrote: > That particular header is included. As I mentioned, I am using memset > in other areas of the code, as well as the same file. If I take this > one call out of the source, it compiles, links and I am able to perform > and insmod correctly. Below are the headers that are included in the > file, and the area of the code that is causing the problem. Let me say > that the code, even with this particular call in, compiles and links. > The problem happens when I go to perform the insmod on it. > > #include <memory.h> > #include <string.h> > #include "myownheaders.h" > > > void myfunction( void *a, int len ) > { > .... > Mymemmove() //used because NdisMoveMemory can not be used > memset( &a->WORD[NUMWORDS-len], 0, len*4); > ... > } Inside a driver (or module) file, any include reference that doesn't begin with either <linux/foo.h> or <asm/foo.h> should always raise a red flag. There are user-land header files ("/usr/include") and kernel header files ("/usr/src/linux/include") and never the twain shall meet. Mixing includes is always a bad idea. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + -- -- -- -- -- -- -- -- -- -- Tommy Reynolds | mailto: <reynolds@redhat.com> Red Hat, Inc., Embedded Development Services | Phone: +1.256.704.9286 307 Wynn Drive NW, Huntsville, AL 35805 USA | FAX: +1.256.837.3839 Senior Software Developer | Mobile: +1.919.641.2923 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Unresolved symbol memset 2001-12-05 18:55 ` Michael Smith 2001-12-05 18:57 ` rddunlap 2001-12-05 19:16 ` Tommy Reynolds @ 2001-12-05 19:34 ` Charles Cazabon 2 siblings, 0 replies; 12+ messages in thread From: Charles Cazabon @ 2001-12-05 19:34 UTC (permalink / raw) To: linux-kernel Michael Smith <smithmg@agere.com> wrote: > That particular header is included. [...] > #include <memory.h> > #include <string.h> > #include "myownheaders.h" That's not what Randy asked was included. He said: > > However-- does the problem source file have > > #include <linux/string.h> > > in it? It should. Very, very different. Charles -- ----------------------------------------------------------------------- Charles Cazabon <linux@discworld.dyndns.org> GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ ----------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Unresolved symbol memset 2001-12-05 18:18 Unresolved symbol memset Michael Smith 2001-12-05 18:26 ` rddunlap @ 2001-12-05 18:40 ` John Levon 2001-12-05 18:59 ` Michael Smith 1 sibling, 1 reply; 12+ messages in thread From: John Levon @ 2001-12-05 18:40 UTC (permalink / raw) To: linux-kernel; +Cc: smithmg, kernelnewbies On Wed, Dec 05, 2001 at 01:18:37PM -0500, Michael Smith wrote: > Hello all, > I am new the Linux world and have a problem which is somewhat > confusing. I am using the system call memset() in kernel code written > for Red Hat 7.1(kernel 2.4). I needed to make this code compatible with > Red Hat 6.2(kernel 2.2) and seem to be getting a unresolved symbol. > This is only happening in one place of the code in one file. I am using > memset() in other areas of the code which does not lead to the problem. You need to compile with optimisation turned on. Btw, your question would be more appropriate on the kernelnewbies list - see http://www.kernelnewbies.org/ regards john -- "Faced with the prospect of rereading this book, I would rather have my brains ripped out by a plastic fork." - Charles Cooper on "Business at the Speed of Thought" ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Unresolved symbol memset 2001-12-05 18:40 ` John Levon @ 2001-12-05 18:59 ` Michael Smith 2001-12-05 19:01 ` rddunlap 2001-12-05 19:09 ` Richard B. Johnson 0 siblings, 2 replies; 12+ messages in thread From: Michael Smith @ 2001-12-05 18:59 UTC (permalink / raw) To: 'John Levon', linux-kernel; +Cc: kernelnewbies I have optimization turned. Using -02 in the makefile. I am new to the linux kernel but not kernel development. If you still think this is the wrong list, I will post on the other one. Sorry if it is the wrong list -----Original Message----- From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of John Levon Sent: Wednesday, December 05, 2001 1:40 PM To: linux-kernel@vger.kernel.org Cc: smithmg@agere.com; kernelnewbies@nl.linux.org Subject: Re: Unresolved symbol memset On Wed, Dec 05, 2001 at 01:18:37PM -0500, Michael Smith wrote: > Hello all, > I am new the Linux world and have a problem which is somewhat > confusing. I am using the system call memset() in kernel code written > for Red Hat 7.1(kernel 2.4). I needed to make this code compatible with > Red Hat 6.2(kernel 2.2) and seem to be getting a unresolved symbol. > This is only happening in one place of the code in one file. I am using > memset() in other areas of the code which does not lead to the problem. You need to compile with optimisation turned on. Btw, your question would be more appropriate on the kernelnewbies list - see http://www.kernelnewbies.org/ regards john -- "Faced with the prospect of rereading this book, I would rather have my brains ripped out by a plastic fork." - Charles Cooper on "Business at the Speed of Thought" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Unresolved symbol memset 2001-12-05 18:59 ` Michael Smith @ 2001-12-05 19:01 ` rddunlap 2001-12-05 19:09 ` Richard B. Johnson 1 sibling, 0 replies; 12+ messages in thread From: rddunlap @ 2001-12-05 19:01 UTC (permalink / raw) To: Michael Smith; +Cc: 'John Levon', linux-kernel, kernelnewbies On Wed, 5 Dec 2001, Michael Smith wrote: | I have optimization turned. Using -02 in the makefile. That's a capital (upper case) 'O', not a zero (0). And you should be #include-ing <linux/string.h>, _not_ <string.h>. ~Randy | I am new to the linux kernel but not kernel development. If you still | think this is the wrong list, I will post on the other one. Sorry if it | is the wrong list | | | -----Original Message----- | From: linux-kernel-owner@vger.kernel.org | [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of John Levon | Sent: Wednesday, December 05, 2001 1:40 PM | To: linux-kernel@vger.kernel.org | Cc: smithmg@agere.com; kernelnewbies@nl.linux.org | Subject: Re: Unresolved symbol memset | | On Wed, Dec 05, 2001 at 01:18:37PM -0500, Michael Smith wrote: | | > Hello all, | > I am new the Linux world and have a problem which is somewhat | > confusing. I am using the system call memset() in kernel code written | > for Red Hat 7.1(kernel 2.4). I needed to make this code compatible | with | > Red Hat 6.2(kernel 2.2) and seem to be getting a unresolved symbol. | > This is only happening in one place of the code in one file. I am | using | > memset() in other areas of the code which does not lead to the | problem. ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Unresolved symbol memset 2001-12-05 18:59 ` Michael Smith 2001-12-05 19:01 ` rddunlap @ 2001-12-05 19:09 ` Richard B. Johnson 2001-12-05 19:12 ` Michael Smith 1 sibling, 1 reply; 12+ messages in thread From: Richard B. Johnson @ 2001-12-05 19:09 UTC (permalink / raw) To: Michael Smith; +Cc: 'John Levon', linux-kernel, kernelnewbies On Wed, 5 Dec 2001, Michael Smith wrote: > I have optimization turned. Using -02 in the makefile. > ^___________ < Need more coffee > It's -O2, not -02 Cheers, Dick Johnson Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips). I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any. ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Unresolved symbol memset 2001-12-05 19:09 ` Richard B. Johnson @ 2001-12-05 19:12 ` Michael Smith 0 siblings, 0 replies; 12+ messages in thread From: Michael Smith @ 2001-12-05 19:12 UTC (permalink / raw) To: root; +Cc: 'John Levon', linux-kernel, kernelnewbies That 'O' was a miss type, it is '0' in the makefile. Sorry -----Original Message----- From: Richard B. Johnson [mailto:root@chaos.analogic.com] Sent: Wednesday, December 05, 2001 2:09 PM To: Michael Smith Cc: 'John Levon'; linux-kernel@vger.kernel.org; kernelnewbies@nl.linux.org Subject: RE: Unresolved symbol memset On Wed, 5 Dec 2001, Michael Smith wrote: > I have optimization turned. Using -02 in the makefile. > ^___________ < Need more coffee > It's -O2, not -02 Cheers, Dick Johnson Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips). I was going to compile a list of innovations that could be attributed to Microsoft. Once I realized that Ctrl-Alt-Del was handled in the BIOS, I found that there aren't any. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2001-12-05 19:35 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2001-12-05 18:18 Unresolved symbol memset Michael Smith 2001-12-05 18:26 ` rddunlap 2001-12-05 18:55 ` Michael Smith 2001-12-05 18:57 ` rddunlap 2001-12-05 19:16 ` Tommy Reynolds 2001-12-05 19:35 ` Michael Smith 2001-12-05 19:34 ` Charles Cazabon 2001-12-05 18:40 ` John Levon 2001-12-05 18:59 ` Michael Smith 2001-12-05 19:01 ` rddunlap 2001-12-05 19:09 ` Richard B. Johnson 2001-12-05 19:12 ` Michael Smith
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox