From b94c972042de8dea416b68a2fb92f96688d7761d Mon Sep 17 00:00:00 2001 From: Ricky Taylor Date: Sun, 14 Mar 2021 11:36:57 -0700 Subject: [PATCH] [M68k] Fix extract-section.py under Python 3 read_raw_stdin() was opening a file in binary mode, but Popen was being told to use text mode (universal_newlines). This is benign on Python 2 but an error on Python 3. Differential Revision: https://reviews.llvm.org/D98428 --- utils/extract-section.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/extract-section.py b/utils/extract-section.py index ab475516af9..ca19b0ee8b6 100755 --- a/utils/extract-section.py +++ b/utils/extract-section.py @@ -33,8 +33,7 @@ def get_raw_section_dump(readobj_path, section_name, input_file): import subprocess cmd = [readobj_path, '-elf-output-style=GNU', '--hex-dump={}'.format(section_name), input_file] - proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, - universal_newlines=True) + proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE) if input_file == '-': # From stdin