PATCH: Don't install bad ia64 trampoline

H. J. Lu hjl@lucon.org
Tue Jan 6 18:41:00 GMT 2004


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.


H.J.



More information about the Binutils mailing list