ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
strace shows every *syscall* that your program makes, along with the arguments to it and the return value. You can look up any syscall in the man pages like "man 2 open" "man 2 mmap" etc. I'm not sure why I get "old_mmap" in my output; there is only a page for mmap. Other than that you should be able to look up all the calls your program is making.
u guys seemed to have missed his question. he is asking why mmap() is called, even tho your program doesn't call it. and the answer is as i said above, every program that is linked with libC maps the libc text segment into its address space, and also the libc data and bss sections; in addition the dynamic linker, ld has it's text and data areas mapped as well.
I googled around a lot on the basis of all you rreplies..........
I guess....all of you helped be in building the answer i wanted.
Anyways, Im back with a nw query :-)
Inside the Kernel sourse there are a lot of macros which resemble the following :
"__KERNEL__" (double under scores) and even "_something_"
Do these have any special meanings
Also when a source says :
#ifndef _LINUX_FS_H
#define _LINUX_FS_H
This causes the entire foo.h to only be read once. e.g. you could have bar.c #include foo.h and baz.h, and baz.h #includes foo.h, Then foo.h would be #included twice and you'd get compiler warnings about previous declarations of everything in foo.h.
The whole problem exists because the #include directive is very literal. The compiler sees it as if everything in the #included file is cut and pasted directly in place of the #include.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.