<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import argparse <EOL> from Elf import Elf <EOL> from Elf . elf_lookup import * <EOL> PROGRAM = "<STR_LIT>" <EOL> VERSION = "<STR_LIT>" <EOL> def hidesyms ( args ) : <EOL> elf = Elf ( file ( args . elf , "<STR_LIT>" ) ) <EOL> with open ( args . syms ) as sf : <EOL> hidden_syms = sf . read ( ) . splitlines ( ) <EOL> for dsym in elf . getDynSyms ( ) : <EOL> if dsym . name in hidden_syms : <EOL> print '<STR_LIT>' % ( dsym . st_value , dsym . name ) <EOL> dsym . setStInfo ( STB_LOCAL , dsym . getInfoType ( ) ) <EOL> dsym . setStOther ( STV_HIDDEN ) <EOL> elf . writeDynamic ( ) <EOL> def soname ( args ) : <EOL> print "<STR_LIT>" % ( args . name , args . elf ) <EOL> elf = Elf ( file ( args . elf , "<STR_LIT>" ) ) <EOL> elf . setSoname ( args . name ) <EOL> parser = argparse . ArgumentParser ( prog = PROGRAM , description = "<STR_LIT>" ) <EOL> subparsers = parser . add_subparsers ( title = '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> parser_hs = subparsers . add_parser ( '<STR_LIT>' , help = "<STR_LIT>" ) <EOL> parser_hs . add_argument ( '<STR_LIT>' , help = "<STR_LIT>" ) <EOL> parser_hs . add_argument ( '<STR_LIT>' , help = "<STR_LIT>" ) <EOL> parser_hs . set_defaults ( func = hidesyms ) <EOL> parser_sonm = subparsers . add_parser ( '<STR_LIT>' , help = "<STR_LIT>" ) <EOL> parser_sonm . add_argument ( '<STR_LIT>' , help = "<STR_LIT>" ) <EOL> parser_sonm . add_argument ( '<STR_LIT:name>' , help = "<STR_LIT>" ) <EOL> parser_sonm . set_defaults ( func = soname ) <EOL> args = parser . parse_args ( ) <EOL> args . func ( args ) </s>
