This is the mail archive of the
mailing list for the binutils project.
Re: PATCH: Don't install bad ia64 trampoline
- From: Jim Wilson <wilson at specifixinc dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: 06 Jan 2004 22:17:45 -0800
- Subject: Re: PATCH: Don't install bad ia64 trampoline
- References: <20031212193606.GA17432@lucon.org><firstname.lastname@example.org><20031213032627.GF8167@bubble.sa.bigpond.net.au> <20040106184056.GA11476@lucon.org>
On Tue, 2004-01-06 at 10:40, H. J. Lu wrote:
> The problem is linker won't warn which symbols it can't relax. It is
> not very useful to fix the problem.
That is a reasonable point, but that doesn't rule out the bfd_set_error
solution. We just need to add a call to bfd_error_handler that prints a
useful message. There is one in elf32-sparc.c that looks like a
reasonable candidate to copy from.
(_("%s(%s+0x%lx): unresolvable relocation against symbol
I think this solution is cleaner than your approach. With your
approach, we mysteriously return without resolving some relocs, without
explaining why in a comment. And then some other place in the compiler
will generate an error. At that point, there is no info explaining why
this reloc is unresolved. It is better to generate the error at the
point where we know that we have an error. This makes the code easier
to understand for the next person looking at it. We can do this with
bfd_error_handler and bfd_set_error calls.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com