import sys, struct, glob, shutil def patch_relocs(): patched = 0 for f in glob.glob("*.obj"): outfile = f.replace('.obj', '.o') shutil.copy(f, outfile) with open(outfile, 'rb+') as file: file.seek(0) if file.read(4) != b'\x7fELF': continue file.seek(40) hdr = struct.unpack('