From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29834 invoked by alias); 18 May 2006 22:05:23 -0000 Received: (qmail 29826 invoked by uid 22791); 18 May 2006 22:05:23 -0000 X-Spam-Check-By: sourceware.org Received: from adsl-67-116-42-147.dsl.sntc01.pacbell.net (HELO avtrex.com) (67.116.42.147) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 May 2006 22:05:21 +0000 Received: from [192.168.7.26] ([192.168.7.26]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 18 May 2006 15:05:19 -0700 Message-ID: <446CEF9F.2070403@avtrex.com> Date: Fri, 19 May 2006 09:03:00 -0000 From: David Daney User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) MIME-Version: 1.0 To: Daniel Jacobowitz CC: binutils@sourceware.org Subject: Re: MIPS textrel fix References: <20060518213149.GA14720@nevyn.them.org> In-Reply-To: <20060518213149.GA14720@nevyn.them.org> 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00320.txt.bz2 Daniel Jacobowitz wrote: > While stuck offline earlier today, I revisited the textrel-1 MIPS > failure. Eric originally tried setting DF_TEXTREL during section > relocation, but it's too late: we add the entry in size_dynamic_sections. > But I couldn't see any other way to get it right, since there's no > hook to predict whether elf-eh-frame.c will eliminate a relocation. > > The easiest approach I found was to annul the DT_TEXTREL and DT_FLAGS > changes in finish_dynamic_sections if no text relocations were > actually generated. This is not immensely pretty, but does work. > OK? > > For background, the problem arises from the use of absolute addresses > in .eh_frame. In this case, they're being produced by gas CFI > directives. Is there a reason we can't mix and match encodings? > i.e. why not have gas use a PC-relative format? I'm sure there's > a reason, but I can't think of it... > Could it be related to the reason that GCC no longer generates a PC-relative .eh_frame? I never fully understood the reason, but I think it has to do with MIPS-ELF specifications not allowing the needed relocation types (even though they work well in binutils/glibc/linux). David Daney