From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20649 invoked by alias); 26 Jan 2011 06:28:22 -0000 Received: (qmail 20633 invoked by uid 22791); 26 Jan 2011 06:28:21 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Jan 2011 06:28:14 +0000 Received: from kpbe17.cbf.corp.google.com (kpbe17.cbf.corp.google.com [172.25.105.81]) by smtp-out.google.com with ESMTP id p0Q6SAvx024624 for ; Tue, 25 Jan 2011 22:28:11 -0800 Received: from pwj8 (pwj8.prod.google.com [10.241.219.72]) by kpbe17.cbf.corp.google.com with ESMTP id p0Q6S8ks020059 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Tue, 25 Jan 2011 22:28:09 -0800 Received: by pwj8 with SMTP id 8so325400pwj.0 for ; Tue, 25 Jan 2011 22:28:08 -0800 (PST) Received: by 10.142.43.4 with SMTP id q4mr6218670wfq.246.1296023288524; Tue, 25 Jan 2011 22:28:08 -0800 (PST) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id w14sm19821028wfd.18.2011.01.25.22.28.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 22:28:07 -0800 (PST) From: Ian Lance Taylor To: ali hagigat Cc: binutils@sourceware.org Subject: Re: The meaning of LMA and location counter in GNU ld References: Date: Wed, 26 Jan 2011 06:28:00 -0000 In-Reply-To: (ali hagigat's message of "Wed, 26 Jan 2011 09:15:01 +0330") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00352.txt.bz2 ali hagigat writes: > 3.4.4 Assign alias names to memory regions > SECTIONS > { > .text : > { > *(.text) > } > REGION_TEXT > .rodata : > { > *(.rodata) > rodata_end = .; > } > REGION_RODATA > .data : AT (rodata_end) > { > data_start = .; > *(.data) > } > REGION_DATA > data_size = SIZEOF(.data); > data_load_start = LOADADDR(.data); > .bss : > { > *(.bss) > } > REGION_BSS > } > --------------------------------------------------------------- > I have copied part of the manual for ld. > In front of .data, there is an AT command: AT (rodata_end) > Is it necessary to write it? If I do not write it, any ways the load > address for .data section will be after .rodata regardless of > REGION_RODATA. Is that right? In this specific example, yes, that's right. Ian