Back to index

enigmail  1.4.3
Classes | Functions | Variables
expandlibs_exec Namespace Reference

Classes

class  ExpandArgsMore
class  SectionFinder

Functions

def main

Variables

list SECTION_INSERT_BEFORE

Function Documentation

Definition at line 303 of file expandlibs_exec.py.

00303 
00304 def main():
00305     parser = OptionParser()
00306     parser.add_option("--extract", action="store_true", dest="extract",
00307         help="when a library has no descriptor file, extract it first, when possible")
00308     parser.add_option("--uselist", action="store_true", dest="uselist",
00309         help="use a list file for objects when executing a command")
00310     parser.add_option("--verbose", action="store_true", dest="verbose",
00311         help="display executed command and temporary files content")
00312     parser.add_option("--symbol-order", dest="symbol_order", metavar="FILE",
00313         help="use the given list of symbols to order symbols in the resulting binary when using with a linker")
00314 
00315     (options, args) = parser.parse_args()
00316 
00317     with ExpandArgsMore(args) as args:
00318         if options.extract:
00319             args.extract()
00320         if options.symbol_order:
00321             args.orderSymbols(options.symbol_order)
00322         if options.uselist:
00323             args.makelist()
00324 
00325         if options.verbose:
00326             print >>sys.stderr, "Executing: " + " ".join(args)
00327             for tmp in [f for f in args.tmp if os.path.isfile(f)]:
00328                 print >>sys.stderr, tmp + ":"
00329                 with open(tmp) as file:
00330                     print >>sys.stderr, "".join(["    " + l for l in file.readlines()])
00331             sys.stderr.flush()
00332         exit(subprocess.call(args))


Variable Documentation

Initial value:
00001 [
00002   ('.text', '.fini'),
00003   ('.rodata', '.rodata1'),
00004   ('.data.rel.ro', '.dynamic'),
00005   ('.data', '.data1'),
00006 ]

Definition at line 71 of file expandlibs_exec.py.