New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 773444 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 1
Type: Bug



Sign in to add a comment

Strip Fuchsia ARM64 binaries when constructing the bootfs.

Project Member Reported by w...@chromium.org, Oct 10 2017

Issue description

We can't currently strip the binaries we build, because there is no "strip" tool in the build toolchain, and the Linux/x64 platform-supplied strip command doesn't supprot aarch64.

Once we have a binutils strip command supporting aarch64 rolled into Chromium, we should use that.
 

Comment 1 by w...@chromium.org, Nov 1 2017

Cc: jam...@chromium.org
Components: Internals>PlatformIntegration
Labels: -Pri-3 M-65 Pri-2
Owner: w...@chromium.org
Status: Started (was: Available)
jamesr@ wrote a Python script capable of stripping aarch64 ELF binaries, which we can use while we're lacking an aarch64-capable native 'strip' command:
https://fuchsia.googlesource.com/packages/+/master/gn/elfinfo.py

Comment 2 by jamesr@google.com, Nov 2 2017

For posterity, Roland wrote that script.

Comment 3 by w...@chromium.org, Nov 2 2017

Cc: mcgrathr@chromium.org
Thanks for the correction, James; have noted that in the CL description for proper attribution. :)

Comment 4 by w...@chromium.org, Nov 16 2017

Labels: -Pri-2 -M-65 M-64 Pri-1
Bumping timeline, since booting on e.g. HiKey devices is super flaky without this.
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/61c3f0c0d9f0895939a2e18920dde44f679bcd54

commit 61c3f0c0d9f0895939a2e18920dde44f679bcd54
Author: Wez <wez@chromium.org>
Date: Fri Nov 17 02:23:50 2017

Land a fork of Fuchsia's elfinfo.py, and update runner_common to use it.

elfinfo.py is a direct fork of mcgrathr@'s implementation:
https://fuchsia.googlesource.com/packages/+/master/gn/elfinfo.py

For simplicity the runner script now uses elfinfo to strip binaries
regardless of the target architecture.

Bug:  773444 
Change-Id: Ic9dcc0298b69da05dcea1e178c3539bdfa1dccbe
Reviewed-on: https://chromium-review.googlesource.com/750238
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Roland McGrath <mcgrathr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517251}
[modify] https://crrev.com/61c3f0c0d9f0895939a2e18920dde44f679bcd54/build/config/fuchsia/rules.gni
[add] https://crrev.com/61c3f0c0d9f0895939a2e18920dde44f679bcd54/build/fuchsia/elfinfo.py
[modify] https://crrev.com/61c3f0c0d9f0895939a2e18920dde44f679bcd54/build/fuchsia/runner_common.py

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fd04777ecd80366d6b55afa2ebf9ffc19c553fd9

commit fd04777ecd80366d6b55afa2ebf9ffc19c553fd9
Author: Wez <wez@chromium.org>
Date: Thu Nov 30 00:53:41 2017

Switch Fuchsia executable runner to use third_party/eu-strip.

Previously we used the host platform's 'strip' command to remove symbols
from binaries while constructing the bootfs, but this was limited to
working with binaries matching the host architecture (i.e. we could not
strip ARM64 binaries on an x64 host).

We addressed this with a Python script capable of working with a wider
variety of architectures. eu-strip can work with both x64 and ARM64
binaries and is already present in Chromium checkouts.

We also switch from stripping binaries manually, at run-time, to doing
so using the strip hook already present in the clang_toolchain build
rules, avoiding the need to re-strip binaries unless they have actually
been re-built since last time.

Bug:  773444 , 772252
Change-Id: I7aab0f3db21a3fcd43433e5de41e2629a15e749c
Reviewed-on: https://chromium-review.googlesource.com/786318
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520354}
[modify] https://crrev.com/fd04777ecd80366d6b55afa2ebf9ffc19c553fd9/build/config/fuchsia/rules.gni
[delete] https://crrev.com/08c0cf8984048bc5c40d01fc679c11b97c17e5a5/build/fuchsia/elfinfo.py
[modify] https://crrev.com/fd04777ecd80366d6b55afa2ebf9ffc19c553fd9/build/fuchsia/runner_common.py
[modify] https://crrev.com/fd04777ecd80366d6b55afa2ebf9ffc19c553fd9/build/toolchain/fuchsia/BUILD.gn

Comment 7 by w...@chromium.org, Nov 30 2017

Status: Fixed (was: Started)

Sign in to add a comment