From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32279 invoked by alias); 7 Aug 2007 13:24:47 -0000 Received: (qmail 32219 invoked by uid 22791); 7 Aug 2007 13:24:44 -0000 X-Spam-Check-By: sourceware.org Received: from exchsrvr.syntech-fuelmaster.com (HELO exchsrvr.syntech-fuelmaster.com) (199.44.250.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 07 Aug 2007 13:24:36 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: m68k-elf, flat format, reloc tables, binutils 2.16, gcc 4.1.1 Date: Tue, 07 Aug 2007 13:24:00 -0000 Message-ID: In-Reply-To: <200708040046.01676.vapier@gentoo.org> From: "Jate Sujjavanich" To: 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/msg00099.txt.bz2 I've checked out there list. What I am trying to figure out now is what I sort of data I should be seeing based on the .data relocation tables. This is so that I can try to figure out whether the error is in elf2flt or the linker. So, I've picked out two entries from the output of a readelf on the libc.elf intermediate binary. [.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. The address of the pointer is .data start + offset. And the pointer value should be .data start + sym value + offset. Is this correct? The _string_syserrmsgs work out (easily verified because they are string pointers). The data pointer does not appear to. Does the info field give any explanation for this? Also, does anyone have suggestions to make more sense of the symbol name ".data"? Many table entries are merely offsets of .data, .bss, and .text, which does not help out with verification. - Jate S. -----Original Message----- From: Mike Frysinger [mailto:vapier@gentoo.org]=20 Sent: Saturday, August 04, 2007 12:46 AM To: binutils@sourceware.org Cc: Jate Sujjavanich Subject: Re: m68k-elf, flat format, reloc tables, binutils 2.16, gcc 4.1.1 On Friday 03 August 2007, Jate Sujjavanich wrote: > I am looking for more information on how the linker generates reloc=20 > tables. I am using binutils 2.16 and am trying to get shared libraries > working for the Coldfire architecture under uClinux. The first=20 > dependency (shared library uClibc) fails to load because of invalid=20 > values in the relocation table. elf2flt is not a binutils thing, it's a uClinux thing. you'd probably be better off asking on the uClinux-dev mailing list -mike