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: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#781381}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8e8ed621fae465bf5f91c80c7669a7e1d0bdc770
diff --git a/gcc_solink_wrapper.py b/gcc_solink_wrapper.py
index e4aafa2..03e0f91 100755
--- a/gcc_solink_wrapper.py
+++ b/gcc_solink_wrapper.py
@@ -25,6 +25,7 @@
   readelf = subprocess.Popen(wrapper_utils.CommandToRun(
       [args.readelf, '-d', args.sofile]), stdout=subprocess.PIPE, bufsize=-1)
   for line in readelf.stdout:
+    line = line.decode('utf-8')
     if 'SONAME' in line:
       toc += line
   return readelf.wait(), toc
@@ -39,6 +40,7 @@
       stdout=subprocess.PIPE,
       bufsize=-1)
   for line in nm.stdout:
+    line = line.decode('utf-8')
     toc += ' '.join(line.split(' ', 2)[:2]) + '\n'
   return nm.wait(), toc