Infer appropriate GNU_STACK alignment for a shared library.
commit5bb330d5ec0cfdd4d6e1b3f5112370696ce9f30d
authorsimonb <simonb@chromium.org>
Wed, 11 Feb 2015 18:53:42 +0000 (11 10:53 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 11 Feb 2015 18:54:23 +0000 (11 18:54 +0000)
treeaf20bc824fe0ecba38762da1189acfc3fc4486ff
parent1af1d42e49433506fdaeefdcc2634f0798ca4610
Infer appropriate GNU_STACK alignment for a shared library.

Remove GNU_STACK segment alignment constants from elf traits, and
instead infer them from the linker (gold, or ld) used to build the
shared library whose relocations are being packed or unpacked.

In practice Android ignores any GNU_STACK segment.  However, preserving
the values across a pack-and-unpack round trip helps to ensure that
the round trip library is bit-identical to the original input file.

BUG=385553

Review URL: https://codereview.chromium.org/912403002

Cr-Commit-Position: refs/heads/master@{#315801}
tools/relocation_packer/src/elf_file.cc
tools/relocation_packer/src/elf_traits.h