This is the mail archive of the
mailing list for the binutils project.
Re: PATCH: Don't install bad ia64 trampoline
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jim Wilson <wilson at specifixinc dot com>, binutils at sources dot redhat dot com
- Date: Tue, 6 Jan 2004 10:40:56 -0800
- Subject: Re: PATCH: Don't install bad ia64 trampoline
- References: <20031212193606.GA17432@lucon.org> <email@example.com> <20031213032627.GF8167@bubble.sa.bigpond.net.au>
On Sat, Dec 13, 2003 at 01:56:27PM +1030, Alan Modra wrote:
> On Fri, Dec 12, 2003 at 04:20:34PM -0800, Jim Wilson wrote:
> > On Fri, 2003-12-12 at 11:36, H. J. Lu wrote:
> > > When a trampoline is out of range, we get
> > > /usr/local/bin/ld: can't relax section: No such file or directory
> > > This patch changes it to
> > > : relocation truncated to fit: PCREL21B foo
> > This looks OK to me, but I wonder if adding a bfd_set_error call would
> > be a better solution. I don't see "No such file or directory" in the
> > list of bfd errors, so I don't see how we could have gotten that one.
> It comes of not setting bfd_error when returning FALSE from
> elfNN_ia64_relax_section. Presumably bfd_error happened to be
> bfd_error_system_call and thus caused a strerror call.
> elfNN_ia64_relax_section should call bfd_set_error if
> elfNN_ia64_install_value returns anything other than bfd_reloc_ok.
> elfNN_ia64_choose_gp should also call bfd_set_error where it calls
> bfd_error_handler. I think that would cover all the cases where
> elfNN_ia64_relax_section returns FALSE (except one, and that's because
> it needs another fix to return TRUE for non-ELF sections).
The problem is linker won't warn which symbols it can't relax. It is
not very useful to fix the problem.