From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10196 invoked by alias); 22 Feb 2011 15:26:18 -0000 Received: (qmail 10177 invoked by uid 22791); 22 Feb 2011 15:26:17 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,TW_JC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Feb 2011 15:26:13 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1MFQ91v027075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Feb 2011 10:26:09 -0500 Received: from [10.36.7.68] (vpn1-7-68.ams2.redhat.com [10.36.7.68]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1MFQ8tK032245; Tue, 22 Feb 2011 10:26:09 -0500 Message-ID: <4D63D5BF.9010002@redhat.com> Date: Tue, 22 Feb 2011 15:26:00 -0000 From: Nick Clifton User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 MIME-Version: 1.0 To: ali hagigat CC: binutils@sourceware.org Subject: Re: questions about objcopy and ld References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-02/txt/msg00268.txt.bz2 Hi Ali, > Does objcopy adds a final 0 to the outfile? I use it, it seems that > one byte is extra. No. At least I do not see why it would. Do you have a specific example that we could look at ? > When we create some sections by ld, does the size of these sections > have to be a multiple of a number? It depends upon the section type and the target, but in general the answer is yes. > (some sort of alignment) and what is that number? The alignment. The specific value for alignments varies with different sections and different targets. When the linker creates an output section it sets its alignment to largest alignment value of any of the input section whose contents are being mapped into that output section. Cheers Nick