From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29318 invoked by alias); 31 Mar 2005 00:27:35 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 29282 invoked from network); 31 Mar 2005 00:27:28 -0000 Received: from unknown (HELO powerescape.com) (66.224.109.162) by sourceware.org with SMTP; 31 Mar 2005 00:27:28 -0000 Received: from [10.0.1.10] (c-67-161-12-117.hsd1.ca.comcast.net [67.161.12.117]) by powerescape.com (Postfix) with ESMTP id BF20B166CB98 for ; Wed, 30 Mar 2005 16:27:23 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v619.2) Content-Transfer-Encoding: 7bit Message-Id: <13ab0c503312082c7af572c83f523f4f@powerescape.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: binutils@sources.redhat.com From: Pieter Arnout Subject: HELP with linker script!!! Date: Thu, 31 Mar 2005 14:42:00 -0000 X-SW-Source: 2005-03/txt/msg00914.txt.bz2 I read the the Red Hat manual "Using ld, the GNU Linker", but I'm having trouble. Essentially, I'd like to take specific symbols and assign them to a memory region, rather than just take a section and assign it to a memory region. I can obtain the symbol values and symbol type from the objdump or nm output. The only examples offered in the manual, however, only define the output sections .bss and .data by just assigning everything from the .bss and .data input sections to it: SECTIONS { . = 0x10000; .text : { *(.text) } . = 0x8000000; .data : { *(.data) } .bss : { *(.bss) } } I want some finer control. Does anyone know how I can go about ultimately assigning specific symbols (or data structures if you will) to a memory region? Should / can I create a section (much like .text, .data or .bss above) in the linker script and call it "my_section" and assign a list of symbols to "my_section"? Is this how I would go about accomplishing what I want? If so do I reference the symbols by name or by value when I call them out in the SECTIONS command? How does that look like? Additionally, where do I define the start and end regions of my stack and heap? I use .bss for uninitialized variables, .data for initialized variables, but how do I reference the beginning and end of stack and the beginning and end of heap? I need answers urgently. Thanks so much for your help! Pieter