1
1
mirror of https://github.com/rui314/mold.git synced 2024-08-17 17:00:30 +03:00

Update a document

This commit is contained in:
Rui Ueyama 2022-02-22 19:26:08 +09:00
parent 385c1c494d
commit fb6967c0cf

View File

@ -1,14 +1,14 @@
The concept of linking is very simple: a compiler compiles a piece of
The very concept of linking is simple: a compiler compiles a piece of
source code into an object file (a file containing machine code), and
a linker combines object files into a single executable or a shared
library file. However, the actual implementation of the linker for
modern systems is much more complicated because hardware, operating
system, compiler and linker all have many more features.
In this file, I'll explain random topics that you need to understand
to read mold code in the glossary format.
In this file, I'll explain random topics in the glossary format that
you need to understand to read mold code.
- DSO
## DSO
A .so file. Short for Dynamic Shared Object. Often called as a
shared library, a dynamic libray or a shared object as well.
@ -17,7 +17,7 @@ to read mold code in the glossary format.
executables and/or other DSOs. At runtime, a DSO is loaded to a
contiguous region in the virtual address.
- Object file
## Object file
A .o file. An object file contains machine code and data, but it
cannot be executed because it's not self-contained. For example,
@ -30,7 +30,7 @@ to read mold code in the glossary format.
You need to link an object file with other object file or a shared
library to make it exectuable.
- Virtual address space
## Virtual address space
A pointer has a value like 0x803020 which is an address of the
pointee. But it doesn't mean that the pointee resides at the
@ -55,7 +55,7 @@ to read mold code in the glossary format.
way that they can be loaded to any address in the virtual address
space.
- Relocation
## Relocation
A piece of information for the linker as to how to link object files
or a dynamic objects.
@ -86,7 +86,7 @@ to read mold code in the glossary format.
want to fix up not with a displacement but with an absolute address
of a symbol, you need to use `R_X86_64_ABS64` instead.
- Static library
## Static library
A .a file. Often called as an archive file or just archive as well.
@ -121,7 +121,7 @@ to read mold code in the glossary format.
See also: DSO (dynamic library)
- Symbol
## Symbol
A symbol is a label assigned to a specific location in an input file
or an output file. For example, if you define function `foo` and