Commit 8e8ed621 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

Make gcc_solink_wrapper.py work with Python 3.

Make sure |line| is a string and not a bytes object.

Bug: 941669
Change-Id: Ief610b426326f849b49353c5cbce68deb0cd4b3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2260872
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781381}
parent 530f25db
...@@ -25,6 +25,7 @@ def CollectSONAME(args): ...@@ -25,6 +25,7 @@ def CollectSONAME(args):
readelf = subprocess.Popen(wrapper_utils.CommandToRun( readelf = subprocess.Popen(wrapper_utils.CommandToRun(
[args.readelf, '-d', args.sofile]), stdout=subprocess.PIPE, bufsize=-1) [args.readelf, '-d', args.sofile]), stdout=subprocess.PIPE, bufsize=-1)
for line in readelf.stdout: for line in readelf.stdout:
line = line.decode('utf-8')
if 'SONAME' in line: if 'SONAME' in line:
toc += line toc += line
return readelf.wait(), toc return readelf.wait(), toc
...@@ -39,6 +40,7 @@ def CollectDynSym(args): ...@@ -39,6 +40,7 @@ def CollectDynSym(args):
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
bufsize=-1) bufsize=-1)
for line in nm.stdout: for line in nm.stdout:
line = line.decode('utf-8')
toc += ' '.join(line.split(' ', 2)[:2]) + '\n' toc += ' '.join(line.split(' ', 2)[:2]) + '\n'
return nm.wait(), toc return nm.wait(), toc
......
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