From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5892 invoked by alias); 26 Jan 2011 05:45:14 -0000 Received: (qmail 5859 invoked by uid 22791); 26 Jan 2011 05:45:08 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-pz0-f41.google.com (HELO mail-pz0-f41.google.com) (209.85.210.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Jan 2011 05:45:03 +0000 Received: by pzk27 with SMTP id 27so6068pzk.0 for ; Tue, 25 Jan 2011 21:45:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.157.9 with SMTP id f9mr6144187wfe.369.1296020701689; Tue, 25 Jan 2011 21:45:01 -0800 (PST) Received: by 10.143.28.20 with HTTP; Tue, 25 Jan 2011 21:45:01 -0800 (PST) In-Reply-To: References: Date: Wed, 26 Jan 2011 05:45:00 -0000 Message-ID: Subject: Re: The meaning of LMA and location counter in GNU ld From: ali hagigat To: Ian Lance Taylor , binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00351.txt.bz2 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?