-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Docs: add DSO, GOT, and PLT to Lexicon.md
#41690
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
Conversation
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.
One thing that concerns me about this is that it can grow uncontrolled. Each platform has its own lexicon for this. Toolchain can use different lexicon as well. These terms aren't Swift specific, but are general toolchain terms. Do we intend to document all principles of toolchain work?
docs/Lexicon.md
Outdated
|
||
Dynamic shared object, an object file to be used by multiple applications | ||
while they are executing. Dynamically linked libraries are implemented with | ||
DSOs. |
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.
The DSO is the .so/.dylib/.dll itself, not the object files that are used.
docs/Lexicon.md
Outdated
a section in an executable or a shared library, which enables code to run | ||
independently of the memory address where it is loaded at runtime. Entries | ||
in GOT directly point to absolute addresses of symbols. The format of GOT | ||
is platform-dependent. Dynamic linkers update GOT relocations either on |
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.
I prefer loader to dynamic linker.
docs/Lexicon.md
Outdated
|
||
Procedure linkage table, which is used to call external functions that don't | ||
have their addresses known at link time. These addresses are then resolved | ||
by a dynamic linker at run time. |
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.
Similar
These terms are frequently referenced in Swift source code and comments. Having at least basic definitions for them in `Lexicon.md` should lower the barrier for new contributors.
7cb04ec
to
d4a65b7
Compare
I personally don't intend to document all of them, but only those that I personally found hard to piece together, especially abbreviations. These three abbreviations are used extensively in the codebase and comments. It took me some time to understand their meaning and context in which they're used. I don't know the original intention of the author of this file, but it looks like a precedent has been established with a lot of terms specified in this document not specific to Swift itself. |
Perhaps we ought to refine/scope these entries to their usages in the project. For example, IRGen makes heavy usage of "GOT" as in "GOT-equivalent variable" to describe the way it forms references to global objects that may or may not be external references. We can also cross reference resources like the LLVM langref if need be (for example, they provide a pragmatic explanation of DSO local variables). |
Update GOT entry.
@swift-ci smoke test |
@swift-ci test windows |
These terms are frequently referenced in Swift source code and comments. Having at least basic definitions for them in
Lexicon.md
should lower the barrier for new contributors.