binfmt/modlib: reduce size of binary_s if CONFIG_LIBC_MODLIB is disabled

Test on nsh/sim

before:
sizeof(struct binary_s): 216

after:
sizeof(struct binary_s): 56(-160)

Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
chao an 2024-12-11 08:50:34 +08:00 committed by Xiang Xiao
parent fd3f0b7dd9
commit 1efbe6b302

View file

@ -68,8 +68,14 @@ struct binary_s
main_t entrypt; /* Entry point into a program module */
FAR void *mapped; /* Memory-mapped, address space */
#ifdef CONFIG_LIBC_MODLIB
struct module_s mod; /* Module context */
#endif
#ifdef CONFIG_PIC
FAR void *picbase; /* Position-independent */
#endif
#ifdef CONFIG_ARCH_ADDRENV
/* Address environment.