-
Notifications
You must be signed in to change notification settings - Fork 10
shared-libs: add description #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
4f3c590
to
99e99c0
Compare
@@ -0,0 +1,41 @@ | |||
# Shared libraries | |||
|
|||
Phoenix-RTOS supports building shared libs and dynamically-linked executables. Shared libs are support on all MMU platforms but aarch64 and on NOMMU arm. On NOMMU the FDPIC format is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD013/line-length Line length [Expected: 120; Actual: 188]
|
||
To compile a library as a shared include of `include $(static-lib.mk)` to `include $(shared-lib.mk)`. | ||
|
||
In cases of simple libraries this might be enough, however building a shared library is more similar to building a binary than a static library, thus more compilation options are available. Please refer for full list to `phoenix-rtos-build/makes/shared-lib.mk`. Most importantly libraries on which the shared library depends can be specified and few shared library specific options are available: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD013/line-length Line length [Expected: 120; Actual: 396]
|
||
### Building dynamically linked executable | ||
|
||
In most cases compilation of a dynamically-linked executable is as easy as changing `include $(binary.mk)` to `include $(binary-dyn.mk)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD013/line-length Line length [Expected: 120; Actual: 137]
|
||
`binary-dyn.mk` additionally allows to specify: | ||
|
||
- **DEP_LIBS_SHARED** - shared libraries from current repo needed to be compiled/installed before this component (shortcut for putting something in LIBS and DEPS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD013/line-length Line length [Expected: 120; Actual: 162]
|
||
### ldconfig | ||
|
||
To create correct symlinks for shared libraries `ldconfig` needs to run at system boot. So, it has to be added to startup script on targets using shared libs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD013/line-length Line length [Expected: 120; Actual: 158]
bc7aae9
to
42207ac
Compare
JIRA: RTOS-664
42207ac
to
b7b3b30
Compare
JIRA: RTOS-664