This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LTO vs. default section alignment vs. relocatable links.


    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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]