From 26ad0042f1443b0c7adce92d97c9eb7e73d8cc80 Mon Sep 17 00:00:00 2001 From: Hchild Date: Mon, 26 Oct 2020 18:36:29 -0400 Subject: [PATCH] Update linux-bootstrap-4.md --- Booting/linux-bootstrap-4.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Booting/linux-bootstrap-4.md b/Booting/linux-bootstrap-4.md index d45b9de..9ec7ece 100644 --- a/Booting/linux-bootstrap-4.md +++ b/Booting/linux-bootstrap-4.md @@ -336,9 +336,7 @@ ENTRY(startup_32) #define __HEAD .section ".head.text","ax" ``` -Here, `.head.text` is the name of the section and `ax` is a set of flags. In our case, these flags show us that this section is [executable](https://en.wikipedia.org/wiki/Executable - -In simple terms, this means that a Linux kernel with this option set can be booted from different addresses. Technically, this is done by compiling the decompressor as [position independent code](https://en.wikipedia.org/wiki/Position-independent_code). If we look at [arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/v4.16/arch/x86/boot/compressed/Makefile), we can see that the decompressor is indeed compiled with the `-fPIC` flag: +Here, `.head.text` is the name of the section and `ax` is a set of flags. In our case, these flags show us that this section is [executable](https://en.wikipedia.org/wiki/Executable). In simple terms, this means that a Linux kernel with this option set can be booted from different addresses. Technically, this is done by compiling the decompressor as [position independent code](https://en.wikipedia.org/wiki/Position-independent_code). If we look at [arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/v4.16/arch/x86/boot/compressed/Makefile), we can see that the decompressor is indeed compiled with the `-fPIC` flag: ```Makefile KBUILD_CFLAGS += -fno-strict-aliasing -fPIC