PR bfd/14207 changes vs *-*-nacl* targets
H.J. Lu
hjl.tools@gmail.com
Mon Jul 2 22:43:00 GMT 2012
On Mon, Jul 2, 2012 at 12:08 PM, Roland McGrath <mcgrathr@google.com> wrote:
> Since the changes to fix bug 14207, I'm now seeing these new failures
> for arm-nacl, i686-nacl, and x86_64-nacl targets:
>
> UNRESOLVED: strip -z relro (relro1)
> UNRESOLVED: objcopy -z relro (relro1)
> UNRESOLVED: objcopy -z relro (tdata1)
> UNRESOLVED: objcopy -z relro (tdata2)
>
> These are hitting the abort in assign_file_positions_for_non_load_sections
> added by:
>
> 2012-06-12 H.J. Lu <hongjiu.lu@intel.com>
>
> PR bfd/14207
> * elf.c (assign_file_positions_for_non_load_sections): Abort if
> PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
>
> (Incidentally, why is that a conditional call to abort instead of a use of
> BFD_ASSERT?)
>
> Dropping the new check I do indeed get a bogus PT_NULL header generated.
> So it looks like earlier fix:
>
> 2012-06-12 Alan Modra <amodra@gmail.com>
>
> PR ld/14207
> * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
> sections at end of PT_LOAD segment when searching for segment
> that contains end of relro extent.
>
> for this issue did not cover all cases. I lack the context that folks like
> Alan have on how this stuff is organized in the linker, so it's probably
> easier for someone else to build a --target=x86_64-nacl configuration and
> debug this than for me to figure it all out myself.
>
The problem is _bfd_elf_map_sections_to_segments isn't consistent
with assign_file_positions_for_load_sections. I don't think it is handled
properly between _bfd_elf_map_sections_to_segments and
assign_file_positions_for_load_sections.
Also I am not sure if NACL segment layout is compatible with GNU_RELRO.
--
H.J.
More information about the Binutils
mailing list