Commit b0744352 authored by Christian Dietrich's avatar Christian Dietrich
Browse files

wrappers/gcc: strip filename symbol

The gcc compiler adds a FILE symbol to the object file. In order to make
more object hashes equal, we strip exactly that symbol from the .symtab.
parent ed33fb15
......@@ -35,6 +35,8 @@ if __name__ == "__main__":
objectfile = args[args.index("-o")+1]
objectfile_hash = None
if os.path.exists(objectfile):
# Strip filename symbol from binary
call(["strip", "-N", os.path.basename(objectfile).replace(".o", ".c"), objectfile])
with open(objectfile, "rb") as fd:
objectfile_data =
objectfile_hash = hashlib.sha1()
Supports Markdown
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