public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Roland McGrath <mcgrathr@google.com>
Cc: binutils@sourceware.org
Subject: Re: PR bfd/14207 changes vs *-*-nacl* targets
Date: Mon, 02 Jul 2012 22:50:00 -0000	[thread overview]
Message-ID: <CAMe9rOoniJbSjRDvHzh2b-WRa-FkFXBiFWxUyzuj0b=fBT092Q@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOo7EBcum4bBY3oUT4_P=4UHCn-Jsuort=6Pp7CCR+KePQ@mail.gmail.com>

On Mon, Jul 2, 2012 at 3:42 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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.
>

You can either fix assign_file_positions_for_load_sections for
NACL segment layout or disable GNU_RELRO for NACL.

-- 
H.J.

  reply	other threads:[~2012-07-02 22:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-02 19:09 Roland McGrath
2012-07-02 19:15 ` H.J. Lu
2012-07-02 19:44   ` Roland McGrath
2012-07-02 22:43 ` H.J. Lu
2012-07-02 22:50   ` H.J. Lu [this message]
2012-07-02 23:12   ` Roland McGrath
2012-07-03  0:03     ` H.J. Lu
2012-07-03  0:04       ` Roland McGrath
2012-07-03  1:14         ` Alan Modra
2012-07-03  5:50           ` Alan Modra
2012-07-03 16:34             ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOoniJbSjRDvHzh2b-WRa-FkFXBiFWxUyzuj0b=fBT092Q@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=mcgrathr@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).