Commit Graph

5 Commits

Author SHA1 Message Date
anjiahao 112b6fd9a5 modlib:support modlib can load PIC elf
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 18:40:06 +08:00
anjiahao a9cb28cd23 modlib:Standardized module loading method
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>
2024-10-05 15:22:02 +08:00
YAMAMOTO Takashi 33aaefa2d1 modlib: Replace Gregory Nutt's copyright notice with Apache 2.0
While I'm here adding a new file. (modlib_loadshdrs.c)

The licence text was copied from:
    sched/sched/sched_getcpu.c
    tools/zds/Makefile
2020-04-13 09:49:22 -06:00
Gregory Nutt 2925c28f8f All linker scripts: Preface all _edata defininitions with . = ALIGN(4). Otherwise, the last bytes in the .data section may not be initialized properly. Also convert all linker scripts indent in units of 8-spaces to units of 4-spaces. 2019-09-15 17:22:16 -06:00
Gregory Nutt cf99fb40c9 This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now.
Squashed commit of the following:

    libs/libxx:  Fix some confusing in naming.  If the directory is called libxx, then the library must be libxx.a (unless perhaps LIBCXX is selected).
    libs/:  Fix paths in moved library directories.
    libs:  Brute force move of libc, libnx, and libxx to libs.  Cannot yet build it in that configuration.
2018-05-29 13:21:26 -06:00