This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Clear non_elf on _GLOBAL_OFFSET_TABLE_
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, binutils at sourceware dot org
- Date: Thu, 30 Sep 2010 19:02:58 -0700
- Subject: Re: PATCH: Clear non_elf on _GLOBAL_OFFSET_TABLE_
- References: <20100924052736.GA15942@intel.com> <20100924122815.GO16376@bubble.grove.modra.org>
On Fri, Sep 24, 2010 at 5:28 AM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Sep 23, 2010 at 10:27:36PM -0700, H.J. Lu wrote:
>> This patch clears non_elf on _GLOBAL_OFFSET_TABLE_
>
> To stop _bfd_elf_fix_symbol_flags non_elf code?
>
Yes, it has
/* If this symbol was mentioned in a non-ELF file, try to set
DEF_REGULAR and REF_REGULAR correctly. This is the only way to
permit a non-ELF file to correctly refer to a symbol defined in
an ELF dynamic object. */
if (h->non_elf)
I don't see how it can be referenced it defined in a DSO from
a non-ELF file since
1. _GLOBAL_OFFSET_TABLE_ is an ELF symbol.
2. It is forced local.
--
H.J.