* the grep based method to access ELF class based on readelf
output assume the English-language output
* fix lunaconfig do not update the config tree when saving
default("i386")
env_val = env("ARCH")
- if env_val is not None:
+ if env_val:
set_value(env_val)
@Term
$(ksymtable): $(tmp_kbin)
$(call status_,KSYM,$@)
- @scripts/gen_ksymtable.sh DdRrTtAGg $< > .lunaix_ksymtable.S
+ @ARCH=$(ARCH) scripts/gen_ksymtable.sh DdRrTtAGg $< > .lunaix_ksymtable.S
@$(CC) $(CFLAGS) -c .lunaix_ksymtable.S -o $@
super().__init__()
self.__ws_path = path.abspath(workspace)
- self.__exec_globl = globals()
+ self.__exec_globl = {}
self.__eval_stack = []
self.__lc_modules = []
self.__config_val = {}
do_config(opts, lcfg_env)
else:
print("No configuration file detected, skipping...")
+
+ lcfg_env.update()
lcfg_env.save(opts.config_save)
lcfg_env.export()
else:
bin=$2
nm_out=$(nm -nfbsd "$bin")
-class_info=$(readelf -h "$bin" | grep 'Class:' | awk '{print $2}')
+# class_info=$(readelf -h "$bin" | grep 'Class:' | awk '{print $2}')
allsyms=($nm_out)
allsyms_len=${#allsyms[@]}
dtype="4byte"
-if [ "$class_info" == 'ELF64' ]; then
+if [ "$ARCH" == 'x86_64' ]; then
dtype="8byte"
fi