From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28861 invoked by alias); 7 Aug 2007 13:47:44 -0000 Received: (qmail 28816 invoked by uid 22791); 7 Aug 2007 13:47:43 -0000 X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 07 Aug 2007 13:47:38 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 9C5AA122AB; Tue, 7 Aug 2007 15:47:35 +0200 (CEST) From: Andreas Schwab To: "Jate Sujjavanich" Cc: Subject: Re: m68k-elf, flat format, reloc tables, binutils 2.16, gcc 4.1.1 References: X-Yow: Are you guys lined up for the METHADONE PROGRAM or FOOD STAMPS?? Date: Tue, 07 Aug 2007 13:47:00 -0000 In-Reply-To: (Jate Sujjavanich's message of "Tue\, 7 Aug 2007 09\:29\:13 -0400") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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: 2007-08/txt/msg00101.txt.bz2 "Jate Sujjavanich" writes: > [.rela.data] > Offset Info Type Sym.Value Sym. Name + Addend > 00001e50 0007b301 R_68K_32 000010fc _string_syserrmsgs + 0 > 0000213e 00000301 R_68K_32 00000000 .data + 2f9f > > My understanding is as follows. The relocation table for .rela.data is a > list of pointers in the data section which must be updated for relocated > code. Type, sym value and sym name are derived fields. The relocation entry only contains offset, info and addend, where info encodes the type and the symbol index. Sym value is just the value of the symbol as recorded in the symbol table. The item to relocate is addressed by the offset into the section, the value is computed according to the type (as defined by the psABI). For R_68K_32 the value is the (relocated) symbol value plus the addend, to be stored in the 32 bit field at the offset. > Also, does anyone have suggestions to make more sense of the symbol > name ".data"? It's the section symbol. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."