diff options
author | Simon Glass <sjg@chromium.org> | 2022-01-29 14:14:04 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-02-09 12:26:12 -0700 |
commit | c1aa66e75dbfcacab1fbca0e3e19c09e08d932d5 (patch) | |
tree | c33854b5848f407f5ad6b2d2337665ccd436eab4 /tools/binman/elf.py | |
parent | 82ee8bfe519307b4175bb0f751da73c8555a0a25 (diff) |
patman: Convert camel case in tools.py
Convert this file to snake case and update all files which use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/elf.py')
-rw-r--r-- | tools/binman/elf.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/binman/elf.py b/tools/binman/elf.py index de2bb4651f..d22a0d4bf5 100644 --- a/tools/binman/elf.py +++ b/tools/binman/elf.py @@ -54,7 +54,7 @@ def GetSymbols(fname, patterns): key: Name of symbol value: Hex value of symbol """ - stdout = tools.Run('objdump', '-t', fname) + stdout = tools.run('objdump', '-t', fname) lines = stdout.splitlines() if patterns: re_syms = re.compile('|'.join(patterns)) @@ -154,7 +154,7 @@ def LookupAndWriteSymbols(elf_fname, entry, section): entry: Entry to process section: Section which can be used to lookup symbol values """ - fname = tools.GetInputFilename(elf_fname) + fname = tools.get_input_filename(elf_fname) syms = GetSymbols(fname, ['image', 'binman']) if not syms: return @@ -282,7 +282,7 @@ SECTIONS # text section at the start # -m32: Build for 32-bit x86 # -T...: Specifies the link script, which sets the start address - cc, args = tools.GetTargetCompileTool('cc') + cc, args = tools.get_target_compile_tool('cc') args += ['-static', '-nostdlib', '-Wl,--build-id=none', '-m32', '-T', lds_file, '-o', elf_fname, s_file] stdout = command.Output(cc, *args) @@ -363,9 +363,9 @@ def UpdateFile(infile, outfile, start_sym, end_sym, insert): raise ValueError("Not enough space in '%s' for data length %#x (%d); size is %#x (%d)" % (infile, len(insert), len(insert), size, size)) - data = tools.ReadFile(infile) + data = tools.read_file(infile) newdata = data[:syms[start_sym].offset] - newdata += insert + tools.GetBytes(0, size - len(insert)) + newdata += insert + tools.get_bytes(0, size - len(insert)) newdata += data[syms[end_sym].offset:] - tools.WriteFile(outfile, newdata) + tools.write_file(outfile, newdata) tout.Info('Written to offset %#x' % syms[start_sym].offset) |