From afe7d23ed551568235b421e4bc94fcf05ea7550b Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Fri, 29 Dec 2017 23:57:43 +0600 Subject: [PATCH] fill up linker script Signed-off-by: Alexander Kuleshov --- Booting/linux-bootstrap-4.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Booting/linux-bootstrap-4.md b/Booting/linux-bootstrap-4.md index 3ccce83..a1b793f 100644 --- a/Booting/linux-bootstrap-4.md +++ b/Booting/linux-bootstrap-4.md @@ -120,7 +120,11 @@ SECTIONS _head = . ; HEAD_TEXT _ehead = . ; - } + } + ... + ... + ... +} ``` If you are not familiar with the syntax of `GNU LD` linker scripting language, you can find more information in the [documentation](https://sourceware.org/binutils/docs/ld/Scripts.html#Scripts). In short, the `.` symbol is a special variable of linker - location counter. The value assigned to it is an offset relative to the offset of the segment. In our case, we assign zero to location counter. This means that our code is linked to run from the `0` offset in memory. Moreover, we can find this information in comments: