diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2008-05-29 15:11:38 -0700 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2008-05-29 15:11:38 -0700 |
| commit | b536209dfb7bd50c37061735fe10d2c19a97d26d (patch) | |
| tree | 9d8ca6882fc5d9721fb0efea1abfd6dc09886814 /core/layout.inc | |
| parent | 3ec40a0119587f63411475c76c69f9db24c7598e (diff) | |
| download | syslinux-b536209dfb7bd50c37061735fe10d2c19a97d26d.tar.gz | |
Move files out of root into core, dos, and utils
Move source files out of the root directory; the root is a mess and
has become virtually unmaintainable. The Syslinux core now lives in
core/; the Linux and generic utilities has moved into utils/, and
copybs.com has moved into dos/; it had to go somewhere, and it seemed
as good a place as any.
Diffstat (limited to 'core/layout.inc')
| -rw-r--r-- | core/layout.inc | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/core/layout.inc b/core/layout.inc new file mode 100644 index 00000000..51460e14 --- /dev/null +++ b/core/layout.inc @@ -0,0 +1,92 @@ +; ----------------------------------------------------------------------- +; +; Copyright 1994-2008 H. Peter Anvin - All Rights Reserved +; +; This program is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation, Inc., 53 Temple Place Ste 330, +; Bostom MA 02111-1307, USA; either version 2 of the License, or +; (at your option) any later version; incorporated herein by reference. +; +; ----------------------------------------------------------------------- + +; +; layout.inc +; +; Memory layout of segments +; + + ; Default to 16-bit code + bits 16 + +; Memory below 0800h is reserved for the BIOS and the MBR. +BSS_START equ 0800h + +; Text starts at the load address of 07C00h. +TEXT_START equ 7C00h + +; The secondary BSS section, above the text; we really wish we could +; just make it follow .bcopy32 or hang off the end, +; but it doesn't seem to work that way. +LATEBSS_START equ 0B800h + +%ifdef MAP + [map all MAP] +%endif + +; +; The various sections and their relationship +; + ; Use .earlybss for things that MUST be in low memory. + section .earlybss nobits start=BSS_START + section .bcopy32 exec nowrite progbits align=4 + section .config write progbits align=4 + section .config.end write nobits align=4 + + ; Use .bss for things that doesn't have to be in low memory; + ; with .bss1 and .bss2 to offload. .earlybss should be used + ; for things that absolutely have to be below 0x7c00. + section .bss write nobits align=16 + + ; Warning here: RBFG build 22 randomly overwrites + ; memory location [0x5680,0x576c), possibly more. It + ; seems that it gets confused and screws up the + ; pointer to its own internal packet buffer and starts + ; writing a received ARP packet into low memory. +%if IS_PXELINUX + section .rbfg write nobits +RBFG_brainfuck: resb 2048 ; Bigger than an Ethernet packet... +%endif + + ; For section following .rbfg +%if IS_PXELINUX + section .bss2 write nobits align=16 +%else + section .bss2 write nobits align=16 +%endif + + section .text exec write progbits align=16 + section .data write progbits align=16 + + section .adv write nobits align=512 + + ; .uibss contains bss data which is guaranteed to be + ; safe to clobber during the loading of the image. This + ; is because while loading the primary image we will clobber + ; the spillover from the last fractional sector load. + section .uibss write nobits align=16 + + ; Normal bss... + section .bss1 write nobits align=16 + + ; Symbols from linker script +%macro SECINFO 1 + extern __%1_start, __%1_lma, __%1_end + extern __%1_len, __%1_dwords +%endmacro + SECINFO bcopy32 + SECINFO config + + global _start + + section .text |
