mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
This notably allow dynamic linking to work! Move entire README to it. Also: - explain what Dhrystone does and run it on gem5 to get DMIPS - create getprops - ./test-executables don't test files that start with "tmp."
28 lines
703 B
Python
Executable File
28 lines
703 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import common
|
|
import json
|
|
import path_properties
|
|
|
|
class Main(common.LkmcCliFunction):
|
|
def __init__(self):
|
|
super().__init__(
|
|
defaults = {
|
|
'show_time': False,
|
|
},
|
|
description='''\
|
|
Get the path_properties for an userland executable:
|
|
https://cirosantilli.com/linux-kernel-module-cheat#path-properties
|
|
TODO check that the path exists.
|
|
''',
|
|
)
|
|
self.add_argument('path')
|
|
|
|
def timed_main(self):
|
|
properties = path_properties.get(self.env['path']).properties
|
|
for key in sorted(properties):
|
|
print('{}={}'.format(key, properties[key]))
|
|
|
|
if __name__ == '__main__':
|
|
Main().cli()
|