1
0
mirror of https://github.com/0xAX/linux-insides.git synced 2025-01-03 12:20:56 +00:00

fill up linker script

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
This commit is contained in:
Alexander Kuleshov 2017-12-29 23:57:43 +06:00
parent 79654a2d83
commit afe7d23ed5
No known key found for this signature in database
GPG Key ID: EE88CAC52D66AC9B

View File

@ -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: