tag:blogger.com,1999:blog-5387089026531498178.post7167020996957640602..comments2024-02-05T14:35:25.249+05:30Comments on Linux Kernel Programming: Stages of Compilation in Linux using gccGVK51http://www.blogger.com/profile/06734756881383286741noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-5387089026531498178.post-90715297154301752902016-02-02T18:34:17.856+05:302016-02-02T18:34:17.856+05:30hi there
thanks for detailed explantionhi there <br />thanks for detailed explantionAnonymoushttps://www.blogger.com/profile/12413119523626163729noreply@blogger.comtag:blogger.com,1999:blog-5387089026531498178.post-37583459591457908312015-07-30T15:07:15.752+05:302015-07-30T15:07:15.752+05:30Linker is dependent on the OS, I mean in terms of ...Linker is dependent on the OS, I mean in terms of virtual address range that has to be allocated and the virtual address created at the linking stage is final and is specific to that machine.GVK51https://www.blogger.com/profile/06734756881383286741noreply@blogger.comtag:blogger.com,1999:blog-5387089026531498178.post-18065102562875226602015-04-08T17:03:51.151+05:302015-04-08T17:03:51.151+05:30Hi GVK51,
Few questions:
Does OS has any role in...Hi GVK51,<br /><br />Few questions:<br /><br />Does OS has any role in Converting Offset to virtual Address.. I mean is Linker dependent on OS in any way.<br /><br />Is the virtual address obtained the here final or do we change something (add/change) in that.BANSALhttps://www.blogger.com/profile/15592026653846551093noreply@blogger.comtag:blogger.com,1999:blog-5387089026531498178.post-87214539386308120372012-12-19T00:46:15.737+05:302012-12-19T00:46:15.737+05:30adding, to above comment:
GCC's external inte...adding, to above comment:<br /><br />GCC's external interface is generally standard for a UNIX compiler. Users invoke a driver program named gcc, which interprets command arguments, decides which language compilers to use for each input file, runs the assembler on their output, and then possibly runs the linker to produce a complete executable binary.<br />refer_to: http://en.wikipedia.org/wiki/GNU_Compiler_CollectionGVK51https://www.blogger.com/profile/06734756881383286741noreply@blogger.comtag:blogger.com,1999:blog-5387089026531498178.post-46850587569093237092012-11-23T01:28:30.862+05:302012-11-23T01:28:30.862+05:30Hi Marc,
Please refere to the following post, may...Hi Marc,<br /><br />Please refere to the following post, may clear few of your doubts.<br /><br />http://www.linuxkernel51.blogspot.in/2012/11/static-and-dynamic-libraries-in-c-in.html<br /><br />2) -- A program is a set of instructions (assembly) that will be loaded on to you RAM during execution and every instruction is placed at a memory location. <br /><br /> An address that serves as a reference point for other addresses is called as base-address. For example, a base-address could indicate the beginning of a program. The address of ever instruction in the program could then be specified by adding an offset to the base-address. For example, the address of the third instruction would be the base-address plus 3. <br /><br />3) with gdb you can debug your code step-by-step. <br /><br />For example if you want to debug your code, then compile code with option -g<br /><br />$ gcc -g test.c -o test<br />$ gdb test<br /><br />you can get lot of info and tutorials in using gdb<br /><br />4) .ko is a kernel module, I din't understand in which context you are using this.<br /><br />5) Please refer to the above link in this comment. <br /><br />Thanks,<br />GVK51GVK51https://www.blogger.com/profile/06734756881383286741noreply@blogger.comtag:blogger.com,1999:blog-5387089026531498178.post-11778781326852970432012-09-16T03:03:57.394+05:302012-09-16T03:03:57.394+05:30Hi GVK51,
Thanks for the beautiful explanation .
...Hi GVK51,<br /><br />Thanks for the beautiful explanation .<br /><br />I have some questions :<br /><br />1) Which occurs before loading or linking ? Any thumb rule or conditions that determine either of them will execute first ? Please elaborate .<br /><br />2) What is offset address and base address ? How do you add the offset to base address ? can you please explain with example ?<br /><br />3) Can you please explain the above scenario wrt Program counters for each instructions maybe by using GDB ?<br /><br />4) Can you also include .o and .ko wrt above program ? <br /><br />5) Please explain the difference between shared object files ( .so) and DLL files ( .so ) ? Although I have read but expecting a more convincing reply .<br /><br />Thanks in advance .<br /><br />Warm Regards,<br />MarcApoorvhttps://www.blogger.com/profile/00745254049233320025noreply@blogger.com