mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
userland: --static implies --userland-build-id static
This commit is contained in:
13
README.adoc
13
README.adoc
@@ -3081,11 +3081,10 @@ You can also try statically linked executables with:
|
||||
./build-userland \
|
||||
--arch aarch64 \
|
||||
--static \
|
||||
--userland-build-id static \
|
||||
;
|
||||
./run \
|
||||
--arch aarch64 \
|
||||
--userland-build-id static \
|
||||
--static \
|
||||
--userland print_argv \
|
||||
--userland-args 'asdf "qw er"' \
|
||||
;
|
||||
@@ -3098,11 +3097,10 @@ Or you can run statically linked built by the host packaged toolchain with:
|
||||
--arch aarch64 \
|
||||
--host \
|
||||
--static \
|
||||
--userland-build-id host-static \
|
||||
;
|
||||
./run \
|
||||
--arch aarch64 \
|
||||
--userland-build-id host-static \
|
||||
--static \
|
||||
--userland print_argv \
|
||||
--userland-args 'asdf "qw er"' \
|
||||
;
|
||||
@@ -3173,7 +3171,6 @@ So let's just play with some static ones:
|
||||
./build-userland \
|
||||
--arch aarch64 \
|
||||
--static \
|
||||
--userland-build-id static \
|
||||
;
|
||||
./run \
|
||||
--arch aarch64 \
|
||||
@@ -3191,16 +3188,16 @@ Step debug also works:
|
||||
./run \
|
||||
--arch aarch64 \
|
||||
--emulator gem5 \
|
||||
--static \
|
||||
--userland print_argv \
|
||||
--userland-args 'asdf "qw er"' \
|
||||
--userland-build-id static \
|
||||
--wait-gdb \
|
||||
;
|
||||
./run-gdb \
|
||||
--arch aarch64 \
|
||||
--emulator gem5 \
|
||||
--static \
|
||||
--userland print_argv \
|
||||
--userland-build-id static \
|
||||
main \
|
||||
;
|
||||
....
|
||||
@@ -3210,7 +3207,7 @@ Step debug also works:
|
||||
As of gem5 7fa4c946386e7207ad5859e8ade0bbfc14000d91, the crappy `se.py` script does not forward the exit status of syscall emulation mode, you can test it with:
|
||||
|
||||
....
|
||||
./run --dry-run --emulator gem5 --userland false --userland-build-id static
|
||||
./run --dry-run --emulator gem5 --static --userland false
|
||||
....
|
||||
|
||||
Source: link:userland/false[].
|
||||
|
||||
@@ -34,14 +34,6 @@ Use the host packaged cross toolchain.
|
||||
'--make-args',
|
||||
default='',
|
||||
)
|
||||
self.add_argument(
|
||||
'--static',
|
||||
default=False,
|
||||
help='''\
|
||||
Build the executables statically. TODO not implemented: Set the build id to 'static'
|
||||
if one was not given explicitly.
|
||||
''',
|
||||
)
|
||||
self.add_argument(
|
||||
'targets',
|
||||
default=[],
|
||||
|
||||
13
common.py
13
common.py
@@ -347,6 +347,14 @@ Machine type:
|
||||
)
|
||||
|
||||
# Userland.
|
||||
self.add_argument(
|
||||
'--static',
|
||||
default=False,
|
||||
help='''\
|
||||
Build userland executables statically. Set --userland-build-id to 'static'
|
||||
if one was not given explicitly.
|
||||
''',
|
||||
)
|
||||
self.add_argument(
|
||||
'-u', '--userland',
|
||||
help='''\
|
||||
@@ -441,7 +449,10 @@ Valid emulators: {}
|
||||
if env['emulator'] in env['emulator_short_to_long_dict']:
|
||||
env['emulator'] = env['emulator_short_to_long_dict'][env['emulator']]
|
||||
if not env['_args_given']['userland_build_id']:
|
||||
env['userland_build_id'] = env['default_build_id']
|
||||
if env['static']:
|
||||
env['userland_build_id'] = 'static'
|
||||
else:
|
||||
env['userland_build_id'] = env['default_build_id']
|
||||
if not env['_args_given']['gem5_build_id']:
|
||||
if env['_args_given']['gem5_worktree']:
|
||||
env['gem5_build_id'] = env['gem5_worktree']
|
||||
|
||||
Reference in New Issue
Block a user