This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC][PATCH] Check ELF relocs after opening all all input files
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, Binutils <binutils at sourceware dot org>
- Date: Thu, 28 Apr 2016 10:41:52 +0930
- Subject: Re: [RFC][PATCH] Check ELF relocs after opening all all input files
- Authentication-results: sourceware.org; auth=none
- References: <20160419134956 dot GA12310 at intel dot com> <57165642 dot 1070808 at redhat dot com> <CAMe9rOrydGcortz2AsujVSQYZCRbSPsi7CFQRnA6ZZiicbUvTA at mail dot gmail dot com> <20160419232457 dot GB20119 at bubble dot grove dot modra dot org> <CAMe9rOqAmmgni51d349yEcW7OcHKq3cPQ3btsJUGR5i_P4uErA at mail dot gmail dot com> <CAMe9rOrCzys1EUwvkYNHjzN8NVxab66WvhUFANXxtb6vxppgXA at mail dot gmail dot com> <20160427022922 dot GA20333 at bubble dot grove dot modra dot org> <CAMe9rOoScOY3U4vSjn8Q22SR6YUh0rhXaO7wvVGvfW+ctc_wew at mail dot gmail dot com>
On Wed, Apr 27, 2016 at 03:24:48PM -0700, H.J. Lu wrote:
> bfd_elf_record_link_assignment
> is called after check_relocs. bfd_elf_record_link_assignment sets non_elf,
> def_regular and forced_local. For PROVIDE, it also updates root.type. They
> are needed in reloc_checks.
My guess is that symbol twiddling done in before_allocation should be
moved to a new ldemul hook called at the start of lang_do_assignments.
The idea being to stabilize symbols earlier.
The hook would twiddle __ehdr_start and call find_statement_assignment
when lang_mark_phase_enum. Reversing the __ehdr_start twiddle stays
in before_allocation.
--
Alan Modra
Australia Development Lab, IBM