Hi raghu, Why don't you specify your own linker script instead of gcc default linker scripts so that you can place the required sections, at what ever memory addresses you need. refer to following site for more information. http://www.nacad.ufrj.br/sgi/860-0247-001/sgi_html/ldLinker_scripts.html http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gnu-linker/s cripts.html We can achieve this by using proper pragma and some compiler options, But using linker script would be right solution. With regards, Anandkumar.C.B -----Original Message----- From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On Behalf Of raghu2383 Sent: Monday, November 17, 2008 2:46 AM To: gcc-help@xxxxxxxxxxx Subject: Speify address for a function while compiling Hi, I am working on security topics, and I need to write a C file that has only one function in it (without the main routine). I need to compile it. Normally the compilation commands for it would be gcc -c blank.c -o blank.o This crates a .o file starting at address 0 with just the single routine inside the .o file. My question is whether I can make the routine be given a specific address, say for example 8048000 instead of starting at location 0. Thanks in advance. -- View this message in context: http://www.nabble.com/Speify-address-for-a-function-while-compiling-tp20 530154p20530154.html Sent from the gcc - Help mailing list archive at Nabble.com. Important notice:This e-mail and any attachment thereto contains corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank You.