From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22319 invoked by alias); 18 Mar 2014 17:13:03 -0000 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 Received: (qmail 22266 invoked by uid 89); 18 Mar 2014 17:13:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: ausxippc101.us.dell.com Received: from ausxippc101.us.dell.com (HELO ausxippc101.us.dell.com) (143.166.85.207) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 18 Mar 2014 17:12:33 +0000 X-LoopCount0: from 10.175.216.251 From: To: CC: Subject: Re: extract ELF load address with binutils? Date: Tue, 18 Mar 2014 17:13:00 -0000 Message-ID: References: <7ADBB2DB4DC7CF4CB641E9ADA826E5E2AAC571BC@HQ-MBX-01.wardrobe.irobot.com> <7ADBB2DB4DC7CF4CB641E9ADA826E5E2E1FBDF7F@hq-mbx-02.wardrobe.irobot.com> <7ADBB2DB4DC7CF4CB641E9ADA826E5E2E1FC0FF6@hq-mbx-02.wardrobe.irobot.com> <7ADBB2DB4DC7CF4CB641E9ADA826E5E2E1FC2052@hq-mbx-02.wardrobe.irobot.com> In-Reply-To: <7ADBB2DB4DC7CF4CB641E9ADA826E5E2E1FC2052@hq-mbx-02.wardrobe.irobot.com> Content-Type: text/plain; charset="Windows-1252" Content-ID: <8E8D118FBD628C4A8F9E6882E11D1838@dell.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00186.txt.bz2 On Mar 18, 2014, at 1:02 PM, Radouch, Zdenek wrote: > I am writing a firmware updater that takes an ELF executable and needs to= extract the RAM data > and the address to where the data should be loaded. ... > The question is can I somehow convince one of the binutils to give me the= load address alone, > so that I don't have to invent an algorithm extracting the address from t= he section dump? I=92m not sure the notion of =93THE load address=94 makes sense. It may be= valid for your specific case, but not in general. ELF files can have mult= iple load sections, each of which has a load address. Normally I would say: look in the program headers. Each header of type LOA= D describes something that=92s loaded, and it shows the addresses. paul