Commit 0f2362be authored by Kevin Marshall's avatar Kevin Marshall Committed by Commit Bot

[fuchsia] Don't archive symbols for stripped binaries.

Fixes a regression in archive tarball construction which was archiving
stripped binaries in the symbol tarball, as if it was a valid symbol
source.

R=fdegans@chromium.org, frousseau@google.com

Bug: 996050
Change-Id: I329f10a3fc3fdf75f354d537d0923ba1cb670ff1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769545Reviewed-by: default avatarSergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarFabrice de Gans-Riberi <fdegans@chromium.org>
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690109}
parent 34d54086
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
import argparse import argparse
import os import os
import subprocess
import sys import sys
import tarfile import tarfile
...@@ -40,6 +41,11 @@ def main(args): ...@@ -40,6 +41,11 @@ def main(args):
# This is a prebuilt which wasn't accompanied by SDK symbols. # This is a prebuilt which wasn't accompanied by SDK symbols.
continue continue
# Exclude stripped binaries (indicated by their lack of symbol tables).
readelf_output = subprocess.check_output(
['readelf', '-S', symbol_source_path])
if not '.symtab' in readelf_output:
continue
# Archive the unstripped ELF binary, placing it in a hierarchy keyed to the # Archive the unstripped ELF binary, placing it in a hierarchy keyed to the
# GNU build ID. The binary resides in a directory whose name is the first # GNU build ID. The binary resides in a directory whose name is the first
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment