Previously, Makefile.rules specified the absolute path to pal-symbols
file via recursive assignment ("="). However, because Makefile.rules
is included from other Makefiles, this led to incorrect path
("graphene/Pal/src/host/Linux/Pal/src/pal-symbols"). This commit
replaces recursive assignment "=" with simple only-once ":=".
This commit rewrites pal-sgx-get-token and pal-sgx-sign in Python3 and
performs a comprehensive cleanup of the code:
- Outputs are sent to separate files (otherwise they were intermixed
during parallel build)
- aesm_pb2.py is re-generated to Python3
- Numeric constants are replaced with symbolic ones
- Using argparse instead of home-grown argument parsing
- Replacing home-grown helper funcs int_to_bytes(), bytes_to_int(), etc.
with standard functions
This commit adds vDSO support: creates vDSO memory region which contains
necessary symbols __vdso_{gettimeofday, clock_getime, time, getcpu} with
wrappers to call function pointers with actual LibOS implementation.
On startup, function pointers are setup to point to actual functions.
With this commit, the Glibc modification to not use vDSO can be removed.
The "cc-option" must be used to conditionally add compiler options only
in those environments which support these options (e.g., older verions
of gcc may not support some options, thus they must be declared via
"cc-option").
Currently cp to Runtime dir is used. Sometimes it is confusing when
binaries are re-built under Pal or LibOS. Symlink is better, so use
it instead.
- It's easy to understand where a file under Runtime dir comes from
- It's easy to understand in which directory to run `make`
- If cp is used, it's quite easy to test old binary under Runtime.
This patch create ln_sf rule and use it instead of cp and applies to
other recipe with cp.
In this context, creating symlink of glibc libraries is mess. This
patch also cleans it up to use Makefile instead of embedding the logic
into python script.
Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
Auto generate offset constants for assembly. replace magic number with
symbolic constants in LibOS/shim/src/syscallas.S.
This patch also introduces Makefile.rules to accommodate common make rules
so that V=1 (like Linux style make) is accepted.
Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>