Skip to content

Commit 5248221

Browse files
anchaolupyuen
authored andcommitted
libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content, which makes it easier for individual developers to understand the capabilities of this module. CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF Signed-off-by: chao an <[email protected]>
1 parent 1b9e6a8 commit 5248221

File tree

120 files changed

+788
-785
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+788
-785
lines changed

Documentation/applications/examples/elf/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ options:
5454

5555
6. Linker scripts. You might also want to use a linker scripts to combine
5656
sections better. An example linker script is at
57-
``nuttx/binfmt/libelf/gnu-elf.ld``. That example might have to be tuned for
57+
``nuttx/binfmt/elf/gnu-elf.ld``. That example might have to be tuned for
5858
your particular linker output to position additional sections correctly. The
5959
GNU LD ``LDELFFLAGS`` then might be::
6060

61-
LDELFFLAGS = -r -e main -T$(TOPDIR)/binfmt/libelf/gnu-elf.ld
61+
LDELFFLAGS = -r -e main -T$(TOPDIR)/binfmt/elf/gnu-elf.ld
6262

Documentation/applications/examples/module/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ configuration options:
5555

5656
6. Linker scripts. You might also want to use a linker scripts to combine
5757
sections better. An example linker script is at
58-
``nuttx/libc/modlib/gnu-elf.ld``. That example might have to be tuned for your
58+
``nuttx/libc/elf/gnu-elf.ld``. That example might have to be tuned for your
5959
particular linker output to position additional sections correctly. The GNU
6060
LD ``LDMODULEFLAGS`` then might be::
6161

62-
LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/libc/modlib/gnu-elf.ld
62+
LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/libc/elf/gnu-elf.ld

Documentation/applications/examples/posix_spawn/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ Test-specific configuration options:
6666

6767
6. Linker scripts. You might also want to use a linker scripts to combine
6868
sections better. An example linker script is at
69-
``nuttx/binfmt/libelf/gnu-elf.ld``. That example might have to be tuned for
69+
``nuttx/binfmt/elf/gnu-elf.ld``. That example might have to be tuned for
7070
your particular linker output to position additional sections correctly. The
7171
GNU LD ``LDELFFLAGS`` then might be::
7272

73-
LDELFFLAGS = -r -e main -T$(TOPDIR)/binfmt/libelf/gnu-elf.ld
73+
LDELFFLAGS = -r -e main -T$(TOPDIR)/binfmt/elf/gnu-elf.ld

Documentation/applications/examples/sotest/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ system. At run time, the shared library is installed and exercised. Requires
5353

5454
6. Linker scripts. You might also want to use a linker scripts to combine
5555
sections better. An example linker script is at
56-
``nuttx/libc/modlib/gnu-elf.ld``. That example might have to be tuned for your
56+
``nuttx/libc/elf/gnu-elf.ld``. That example might have to be tuned for your
5757
particular linker output to position additional sections correctly. The GNU
5858
LD ``LDMODULEFLAGS`` then might be::
5959

60-
LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/libc/modlib/gnu-elf.ld
60+
LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/libc/elf/gnu-elf.ld

Documentation/components/libs/libc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ functions. So we have::
4343
inttypes - inttypes.h
4444
machine - Various architecture-specific implementations.
4545
math - math.h
46-
modlib - Part of module and shared library logic: nuttx/lib/modlib.h
46+
elf - Part of module and shared library logic: nuttx/lib/elf.h
4747
net - Various network-related header files: netinet/ether.h, arpa/inet.h
4848
pthread - pthread.h
4949
pwd - pwd.h

Documentation/legacy_README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ A macOS port is available at: <https://github.com/discoteq/flock>
536536

537537
* Xcode (the native compiler and the rest of the toolchain)
538538

539-
* ELF toolchain (if you want to build modules for CONFIG_LIBC_MODLIB)
539+
* ELF toolchain (if you want to build modules for CONFIG_LIBC_ELF)
540540

541541
brew install x86_64-elf-gcc
542542

Documentation/platforms/arm/samv7/boards/samv71-xult/README.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,10 +1819,10 @@ Configuration sub-directories
18191819
CONFIG_FS_ROMFS=y
18201820
CONFIG_LIBC_ARCH_ELF=y
18211821
CONFIG_MODULE=y
1822-
CONFIG_LIBC_MODLIB=y
1823-
CONFIG_MODLIB_ALIGN_LOG2=2
1824-
CONFIG_MODLIB_BUFFERINCR=32
1825-
CONFIG_MODLIB_BUFFERSIZE=128
1822+
CONFIG_LIBC_ELF=y
1823+
CONFIG_LIBC_ELF_ALIGN_LOG2=2
1824+
CONFIG_LIBC_ELF_BUFFERINCR=32
1825+
CONFIG_LIBC_ELF_BUFFERSIZE=128
18261826

18271827
Add the following for testing shared libraries in the FLAT
18281828
build:

Documentation/platforms/arm/stm32f4/boards/olimex-stm32-p407/index.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,11 @@ the nsh configuration include these additions to the configuration file::
389389
CONFIG_FS_ROMFS=y
390390
CONFIG_LIBC_ARCH_ELF=y
391391
CONFIG_MODULE=y
392-
CONFIG_LIBC_MODLIB=y
393-
CONFIG_MODLIB_MAXDEPEND=2
394-
CONFIG_MODLIB_ALIGN_LOG2=2
395-
CONFIG_MODLIB_BUFFERSIZE=128
396-
CONFIG_MODLIB_BUFFERINCR=32
392+
CONFIG_LIBC_ELF=y
393+
CONFIG_LIBC_ELF_MAXDEPEND=2
394+
CONFIG_LIBC_ELF_ALIGN_LOG2=2
395+
CONFIG_LIBC_ELF_BUFFERSIZE=128
396+
CONFIG_LIBC_ELF_BUFFERINCR=32
397397

398398
The could be followed may be added for testing shared libraries in the
399399
FLAT build using apps/examples/sotest (assuming that you also have SD
@@ -448,10 +448,10 @@ NOTES:
448448
CONFIG_FS_ROMFS=y
449449
CONFIG_LIBC_ARCH_ELF=y
450450
CONFIG_MODULE=y
451-
CONFIG_LIBC_MODLIB=y
452-
CONFIG_MODLIB_ALIGN_LOG2=2
453-
CONFIG_MODLIB_BUFFERINCR=32
454-
CONFIG_MODLIB_BUFFERSIZE=128
451+
CONFIG_LIBC_ELF=y
452+
CONFIG_LIBC_ELF_ALIGN_LOG2=2
453+
CONFIG_LIBC_ELF_BUFFERINCR=32
454+
CONFIG_LIBC_ELF_BUFFERSIZE=128
455455

456456
Add the following for testing shared libraries in the FLAT
457457
build::

Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,11 +1438,11 @@ other NSH configurations include these additions to the configuration file::
14381438
CONFIG_FS_ROMFS=y
14391439
CONFIG_LIBC_ARCH_ELF=y
14401440
CONFIG_MODULE=y
1441-
CONFIG_LIBC_MODLIB=y
1442-
CONFIG_MODLIB_MAXDEPEND=2
1443-
CONFIG_MODLIB_ALIGN_LOG2=2
1444-
CONFIG_MODLIB_BUFFERSIZE=128
1445-
CONFIG_MODLIB_BUFFERINCR=32
1441+
CONFIG_LIBC_ELF=y
1442+
CONFIG_LIBC_ELF_MAXDEPEND=2
1443+
CONFIG_LIBC_ELF_ALIGN_LOG2=2
1444+
CONFIG_LIBC_ELF_BUFFERSIZE=128
1445+
CONFIG_LIBC_ELF_BUFFERINCR=32
14461446

14471447
The could be followed may be added for testing shared libraries in the
14481448
FLAT build using apps/examples/sotest (assuming that you also have SD

Documentation/platforms/sim/sim/boards/sim/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,14 +748,14 @@ apps/interpreters/minibasic.
748748
module
749749
------
750750

751-
This is a configuration to test CONFIG_LIBC_MODLIB with 64-bit modules.
751+
This is a configuration to test CONFIG_LIBC_ELF with 64-bit modules.
752752
This has apps/examples/module enabled.
753753
This configuration is intended for 64-bit host OS.
754754

755755
module32
756756
--------
757757

758-
This is a configuration to test CONFIG_LIBC_MODLIB with CONFIG_SIM_M32
758+
This is a configuration to test CONFIG_LIBC_ELF with CONFIG_SIM_M32
759759
and 32-bit modules.
760760
This has apps/examples/module enabled.
761761
This configuration is intended for 64-bit host OS.
@@ -1353,14 +1353,14 @@ with an MTD RAM driver to simulate the FLASH part.
13531353
sotest
13541354
------
13551355

1356-
This is a configuration to test CONFIG_LIBC_MODLIB with 64-bit modules.
1356+
This is a configuration to test CONFIG_LIBC_ELF with 64-bit modules.
13571357
This has apps/examples/sotest enabled.
13581358
This configuration is intended for 64-bit host OS.
13591359

13601360
sotest32
13611361
--------
13621362

1363-
This is a configuration to test CONFIG_LIBC_MODLIB with CONFIG_SIM_M32
1363+
This is a configuration to test CONFIG_LIBC_ELF with CONFIG_SIM_M32
13641364
and 32-bit modules.
13651365
This has apps/examples/sotest enabled.
13661366
This configuration is intended for 64-bit host OS.

0 commit comments

Comments
 (0)