This is the mail archive of the
mailing list for the binutils project.
Re: MIPS textrel fix
- From: David Daney <ddaney at avtrex dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: binutils at sourceware dot org
- Date: Thu, 18 May 2006 15:05:19 -0700
- Subject: Re: MIPS textrel fix
- References: <20060518213149.GA14720@nevyn.them.org>
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.
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
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).