Module Import alias Import alias Import alias FunctionDef arguments args defaults vararg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Index Num If NameLoad body Raise Call NameLoad BinOpMod Str Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If NameLoad body Expr Call NameLoad Str Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Expr Call NameLoad Str Str NameLoad NameLoad decorator_list If CompareEq NameLoad Str body If CompareNotEq Call NameLoad AttributeLoad NameLoad attr Num body Print Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Expr Call NameLoad NameLoad NameLoad NameLoad
N/A N/A os N/A subprocess N/A sys execute N/A N/A N/A args N/A N/A p N/A N/A subprocess Popen args N/A status N/A N/A N/A os waitpid N/A p pid 0 N/A 1 N/A status N/A N/A N/A Exception N/A failed to execute %s: status %d N/A N/A join args status N/A patch_binary N/A N/A binary libdir interpreter N/A None N/A N/A interpreter N/A N/A N/A execute patchelf --set-interpreter N/A N/A N/A os path join libdir interpreter binary N/A N/A execute patchelf --set-rpath libdir binary N/A N/A N/A __name__ __main__ N/A N/A N/A N/A len N/A sys argv 4 N/A N/A Usage: patch_binary.py <binary_name> <dest_dir> <lib_dir> N/A N/A N/A sys exit 1 N/A binary N/A N/A sys argv N/A 1 N/A destdir N/A N/A sys argv N/A 2 N/A libdir N/A N/A sys argv N/A 3 N/A interpreter N/A filter N/A N/A N/A f N/A N/A N/A f startswith ld- N/A N/A os listdir N/A destdir libdir N/A interpreter N/A N/A interpreter N/A interpreter N/A 0 N/A N/A patch_binary binary libdir interpreter