This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Don't install bad ia64 trampoline

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,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]