This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH, almost obvious] fix bogus ELF check in tc-mips.c
- From: "H . J . Lu" <hjl at lucon dot org>
- To: cgd at broadcom dot com
- Cc: binutils at sources dot redhat dot com, drow at montavista dot com,echristo at redhat dot com
- Date: Thu, 14 Feb 2002 23:53:59 -0800
- Subject: Re: [PATCH, almost obvious] fix bogus ELF check in tc-mips.c
- References: <firstname.lastname@example.org>
On Thu, Feb 14, 2002 at 11:18:16PM -0800, email@example.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:
> (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)))
> 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.