This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Don't install bad ia64 trampoline
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).
--
Alan Modra
IBM OzLabs - Linux Technology Centre