This is the mail archive of the binutils@sources.redhat.com 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, almost obvious] fix bogus ELF check in tc-mips.c


On Thu, Feb 14, 2002 at 11:18:16PM -0800, cgd@broadcom.com wrote:
> Hi H.J.,
> 
> While looking for a fix for my embedded-PIC branch problems which Eric
> and I can be happy with, i noticed a problem with your patch in:
> 
> 	http://sources.redhat.com/ml/binutils/2001-07/msg00477.html
> 
> (The patch in which you added the ELF object format checks that I had
> pointed out were missing.)  Anyway, in the first hunk, you did:
> 
>  #ifdef OBJ_ELF
>                 /* A global or weak symbol is treated as external.  */
> -               && ! (S_IS_EXTERN (sym) || S_IS_WEAK (sym))
> +               && (OUTPUT_FLAVOR == bfd_target_elf_flavour
> +                   && ! (S_IS_EXTERN (sym) || S_IS_WEAK (sym)))
>  #endif
> 
> It's fairly obvious that the test here should be true if not ELF, so
> the same behaviour is seen as when OBJ_ELF is not defined.
> 
> That leads to the following change.  I've verified that binutils still
> compiles and passes make check.  The rules of boolean logic say that
> it should be OK given the intent, and it passes your elf-jal testcase
> that you added when you put in the original patch that the msg quoted
> above updated.
> 
> Any objection?  (I'm wanting to check this in to the branch and
> trunk, and I'd like to be sure that it's OK w/ you since the original
> changes were yours.)
> 

It looks fine to me. Sorry for that.


H.J.


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