From 8a73acb71305c58c6ea58aa0da84d4adb4c125cc Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 15 Feb 2019 16:03:59 +1100 Subject: user: Add a Dynamic Loader section. --- images/user/libdl-load.png | Bin 0 -> 38044 bytes images/user/libdl-load.puml | 39 +++++++++++++++++++++++++++++++++++++++ images/user/libdl.ditaa | 42 ++++++++++++++++++++++++++++++++++++++++++ images/user/libdl.png | Bin 0 -> 26974 bytes 4 files changed, 81 insertions(+) create mode 100644 images/user/libdl-load.png create mode 100644 images/user/libdl-load.puml create mode 100644 images/user/libdl.ditaa create mode 100644 images/user/libdl.png (limited to 'images') diff --git a/images/user/libdl-load.png b/images/user/libdl-load.png new file mode 100644 index 0000000..10aafcf Binary files /dev/null and b/images/user/libdl-load.png differ diff --git a/images/user/libdl-load.puml b/images/user/libdl-load.puml new file mode 100644 index 0000000..b9ae20d --- /dev/null +++ b/images/user/libdl-load.puml @@ -0,0 +1,39 @@ +' +' Libdl Load Executable Object file +' +' Copyright (c) 2019 Chris Johns +' 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 diff --git a/images/user/libdl.ditaa b/images/user/libdl.ditaa new file mode 100644 index 0000000..c317dd1 --- /dev/null +++ b/images/user/libdl.ditaa @@ -0,0 +1,42 @@ +' +' Executable debugging : QEMU +' +' Copyright (c) 2018 Chris Johns +' 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 diff --git a/images/user/libdl.png b/images/user/libdl.png new file mode 100644 index 0000000..f1446dd Binary files /dev/null and b/images/user/libdl.png differ -- cgit v1.2.3