public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Dave Korn <dave.korn.cygwin@gmail.com>
To: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: LTO vs. default section alignment vs. relocatable links.
Date: Tue, 01 Feb 2011 21:19:00 -0000	[thread overview]
Message-ID: <4D487ED3.6010304@gmail.com> (raw)


    Hi all,

  LTO IR sections need to have 1-byte alignment, and that is how we get them
from GAS.  So far so good, but when we do a -r link of two object files, the
placement of the LTO sections is handle by orphan handling, since there aren't
any LTO section output statements in any of the default linker scripts (yet).

  In practice, this leads (at least on i686-pc-cygwin) to the sections being
placed after .rodata, and they get the default section alignment.  That causes
their sizes to be rounded up to 4 with padding, which fatally confuses the
zlib decompressor in lto1 when we come to stream them back in later.

  Rather than modifying all the default linker scripts, can we handle this by
creating a synthetic output statement of some kind at LD start-up?  Or should
this be considered a weakness of orphan placement; should it notice the
alignment of the input section and create a similarly aligned orphan output
section?

    cheers,
      DaveK



             reply	other threads:[~2011-02-01 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 21:19 Dave Korn [this message]
2011-02-01 21:26 ` H.J. Lu
2011-02-01 21:56 ` Alan Modra
2011-02-01 22:27   ` Dave Korn

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=4D487ED3.6010304@gmail.com \
    --to=dave.korn.cygwin@gmail.com \
    --cc=binutils@sourceware.org \
    /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).