-
Notifications
You must be signed in to change notification settings - Fork 4
/
objcmp.py
45 lines (31 loc) · 816 Bytes
/
objcmp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python -3
# -*- coding: utf-8 -*-
#
# Copyright 2010 K. Richard Pixley.
# See LICENSE for details.
#
# Time-stamp: <03-Jan-2011 17:21:27 PST by [email protected]>
"""
A covering script for :py:mod:`elffile`. Compare object files.
"""
from __future__ import unicode_literals, print_function
__docformat__ = 'restructuredtext en'
import glob
import itertools
import optparse
import pprint
import sys
import elffile
if __name__ == '__main__':
progname = sys.argv[0]
u = ''
u += 'usage: %prog objfile1 objfile2'
parser = optparse.OptionParser(usage = u)
options, args = parser.parse_args()
assert len(args) == 2
x = elffile.open(name=args[0])
y = elffile.open(name=args[1])
if x.close_enough(y):
sys.exit()
print('different')
sys.exit(1)