mirror of
https://git.rtems.org/rtems-docs/
synced 2025-10-17 16:37:31 +08:00
user: Add a Dynamic Loader section.
This commit is contained in:
BIN
images/user/libdl-load.png
Normal file
BIN
images/user/libdl-load.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
39
images/user/libdl-load.puml
Normal file
39
images/user/libdl-load.puml
Normal file
@@ -0,0 +1,39 @@
|
||||
'
|
||||
' Libdl Load Executable Object file
|
||||
'
|
||||
' Copyright (c) 2019 Chris Johns <chrisj@rtems.org>
|
||||
' All rights reserved.
|
||||
'
|
||||
@startuml
|
||||
start
|
||||
:dlopen;
|
||||
|
||||
if (check libraries ?) then (changed)
|
||||
:load libraries;
|
||||
else (no change)
|
||||
endif
|
||||
:load object;
|
||||
floating note left
|
||||
Searching of unreolved symbols
|
||||
continues until the remain symbols
|
||||
cannot be found in the global symbol
|
||||
table or libraries.
|
||||
end note
|
||||
while (unresolved symbols?) is (unresolved)
|
||||
if (search globals) then (found)
|
||||
:fix relocations;
|
||||
else (not found)
|
||||
endif
|
||||
if (search libraries ?) then (found)
|
||||
:load library object;
|
||||
floating note left
|
||||
If a symbol is found the library object file
|
||||
is load adding the symbol to the global
|
||||
symbol table and potentially adding more
|
||||
unresolved symbols.
|
||||
end note
|
||||
else (not found)
|
||||
endif
|
||||
endwhile (all searched)
|
||||
stop
|
||||
@enduml
|
42
images/user/libdl.ditaa
Normal file
42
images/user/libdl.ditaa
Normal file
@@ -0,0 +1,42 @@
|
||||
'
|
||||
' Executable debugging : QEMU
|
||||
'
|
||||
' Copyright (c) 2018 Chris Johns <chrisj@rtems.org>
|
||||
' All rights reserved.
|
||||
'
|
||||
@startditaa
|
||||
|
||||
+----------------------------------------+
|
||||
/--------------------------\ | RTL (libdl) |
|
||||
| RTEMS File System | | |
|
||||
| | | +----------+ /---------------\ |
|
||||
| | /------->| archives |<--->| lib symbols | |
|
||||
| +---------------------+ | | | +----------+ \---------------/ |
|
||||
| | /etc/libdl.conf |-----+ | ^ |
|
||||
| +---------------------+ | | | | |
|
||||
| | | | | |
|
||||
| +---------------------+ | | | V |
|
||||
| | /lib/librtemscpu.a | | | | +-------------+ /-------------\ |
|
||||
| | /lib/librtemsbsp.a |-----/ /----->| link editor |<--->| symbols | |
|
||||
| | /lib/libc.a | | | | +-------------+ \-------------/ |
|
||||
| | /lib/libm.a | | | | ^ ^ |
|
||||
| | /lib/libgcc.a | | | | | | |
|
||||
| +---------------------+ | | | | V |
|
||||
| | | | | /---------------\ |
|
||||
| +---------------------+ | | | +----->| objects | |
|
||||
| | /app/foo.o |-------/ | | \---------------/ |
|
||||
| +---------------------+ | | | ^ |
|
||||
\--------------------------/ | | | |
|
||||
| | | |
|
||||
| | /------+--------\ |
|
||||
| +----->| unresolved | |
|
||||
| | | symbols | |
|
||||
| | \---------------/ |
|
||||
| | |
|
||||
+---------|------------------------------+
|
||||
|
|
||||
V
|
||||
/----------------------------------\
|
||||
| target memory |
|
||||
\----------------------------------/
|
||||
@endditaa
|
BIN
images/user/libdl.png
Normal file
BIN
images/user/libdl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Reference in New Issue
Block a user