diff options
author | Frans Kaashoek <[email protected]> | 2011-07-27 20:49:45 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2011-07-27 20:49:45 -0400 |
commit | dccb915282854476ce47752df6631dcce3b8f661 (patch) | |
tree | a84aa8ed35618f99c3d7e8cdd466d22ae7bad597 /data.S | |
parent | 9acdfe0d04f3fcf95c6e392e08afb45bdfe16c20 (diff) | |
parent | 13a96baefc0ff5d8262c4bc8c797bee4b157443c (diff) | |
download | xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.gz xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.bz2 xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.zip |
Merge commit 'origin/master' into page
Diffstat (limited to 'data.S')
-rw-r--r-- | data.S | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +// The kernel layout is: +// +// text +// rodata +// data +// bss +// +// Conventionally, Unix linkers provide pseudo-symbols +// etext, edata, and end, at the end of the text, data, and bss. +// For the kernel mapping, we need the address at the beginning +// of the data section, but that's not one of the conventional +// symbols, because the convention started before there was a +// read-only rodata section between text and data. +// +// To get the address of the data section, we define a symbol +// named data and make sure this is the first object passed to +// the linker, so that it will be the first symbol in the data section. +// +// Alternative approaches would be to parse our own ELF header +// or to write a linker script, but this is simplest. + +.data +.align 4096 +.globl data +data: + .word 1 |