From 9f9cbd54da2ecd94f22622723c12c73264bcf707 Mon Sep 17 00:00:00 2001 From: Zhouyi Zhou Date: Sun, 16 Aug 2020 16:36:20 +0800 Subject: [PATCH] Adding a reference to GNU LD manual to Kernel Initialization. Part 1. --- Initialization/linux-initialization-1.md | 3 +++ contributors.md | 1 + 2 files changed, 4 insertions(+) diff --git a/Initialization/linux-initialization-1.md b/Initialization/linux-initialization-1.md index 748f036..870b7df 100644 --- a/Initialization/linux-initialization-1.md +++ b/Initialization/linux-initialization-1.md @@ -47,6 +47,9 @@ We can see definition of this section in the [arch/x86/kernel/vmlinux.lds.S](htt } :text = 0x9090 ``` +The ADDR keyword above returns the absolute address (here means virtual address) of the named section. The AT keyword above specifies the load address (here means physical address) of the section. The full syntax of section definition is defined in the [Using ld The GNU linker](https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_21.html). + + Besides the definition of the `.text` section, we can understand default virtual and physical addresses from the linker script. Note that address of the `_text` is location counter which is defined as: ``` diff --git a/contributors.md b/contributors.md index 0dea738..ed302f5 100644 --- a/contributors.md +++ b/contributors.md @@ -129,3 +129,4 @@ Thank you to all contributors: * [Marco Torsello](https://github.com/md1512) * [Bruno Meneguele](https://github.com/bmeneguele) * [Sebastian Fricke](https://github.com/initBasti) +* [Zhouyi Zhou](https://github.com/zhouzhouyi-hub) \ No newline at end of file