In order to directly read the version information of the current file from elf or bin files, memory files, etc., for easy debugging and one-to-one correspondence.
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Dynamically apply for memory based on numargs
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
libs/libc: Resolve the issue of undefined behavior when UBSAN is enabled on SIM
If numargs equals 0, it is set to 1 by default
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
struct sockaddr_in
{
sa_family_t sin_family;
in_port_t sin_port;
struct in_addr sin_addr;
uint8_t sin_zero[8];
};
sin_zero is probably a random number.
struct sockaddr_in6
{
sa_family_t sin6_family;
in_port_t sin6_port;
uint32_t sin6_flowinfo;
struct in6_addr sin6_addr;
uint32_t sin6_scope_id;
};
sin6_flowinfo and sin6_scope_id is probably a random number.
Random numbers cause the same server configuration check failed,
so let's initialize it.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Use address addition and subtraction, no longer as the return value of the address. Tags must be removed before calculation
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
gprof can analyze code hot spots based on scheduled sampling.
After adding the "-pg" parameter when compiling, you can view the code call graph.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Remove old directory so that "mv" can succeed instead of triggering "Directory not empty" error.
Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Refer to
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Overview.html
w/o compression, nxgcore command took 41seconds.
w compression, 28second.
If we enable `set trust-readonly-sections on` to read from elf whenever
possible, it furture reduces to 14.9seconds.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
enable LIBSUPCXX:
text data bss dec hex filename
93080 592 5472 99144 18348 nuttx/nuttx
enable LIBCXXABI:
before:
text data bss dec hex filename
126468 352 5960 132780 206ac nuttx/nuttx
after:
text data bss dec hex filename
68048 352 5960 74360 12278 nuttx/nuttx
Summary:
Optimize text segment code size by about 46%.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
1. use '__attribute__((constructor))' mark initialize function
2. use '__attribute__((destructor))' mark uninitialize function
3. compile module with -fvisibility=hidden. use `__attribute__((visibility("default")))`
mark is need export symbol.so not need module_initialize to initialize export symbol.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>