summaryrefslogtreecommitdiff
path: root/core/syslinux.ld
Commit message (Collapse)AuthorAgeFilesLines
* syslinux.ld: remove redundant definition of STACK32_LENH. Peter Anvin2010-06-261-2/+0
| | | | | | STACK32_LEN is already defined in layout.inc. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* syslinux.ld: don't pad between .got and .dataH. Peter Anvin2010-05-121-2/+0
| | | | | | | | Adding padding between .got and .data is unnecessary, and can cause spurious decompression failures when .data is empty (which it almost is already...) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: don't bother zeroing the disk cache and heapH. Peter Anvin2010-03-061-0/+14
| | | | | | | No point in zeroing out the disk cache and the heap. Put those in a .hugebss section which we align, but don't zero. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: page-align .earlybssH. Peter Anvin2010-03-061-1/+1
| | | | | | Leave the entire first page unmolested. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: use assembly for the .stack sectionH. Peter Anvin2010-03-061-3/+1
| | | | | | | Use assembly to define the .stack section, so that it get proper attributes. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: fix lowmem mallocH. Peter Anvin2010-02-241-0/+1
| | | | | | | | | | | | a) initialize *all* the head nodes b) the lowmem heap needs to be paragraph (16 byte) aligned c) use a dedicated tag value for headnodes. The type code should be removed and replaced with special tag values for head node and free. d) for libcom32 code called from the core, do NOT present a usable bounce buffer; we should only ever use lmalloc/lfree. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: move aligned segments earlierH. Peter Anvin2010-02-241-17/+18
| | | | | | | | | Move the aligned segments downward, to provide for the largest possible contiguous lowmem heap. This minimizes the necessary lowmem footprint. (Note: the heap doesn't actually need to be contiguous, but having it not be makes it harder to size.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: use better malloc; add low memory malloc; fix com32 exitH. Peter Anvin2010-02-231-5/+8
| | | | | | | | | | | | | Use a better malloc for the core. In particular, use the same core that we should eventually be able to use for the entire system in Syslinux 5 -- with module awareness, etc. This code can also accommodate multiple heaps. Set up a separate heap for lowmem; the intent is to use explicit lowmem allocations instead of the static bounce buffer. The lowmem allocation is also exported via the pmapi mechanism, so modules can safely allocate lowmem. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: let xfer_buf_seg, real_mode_seg be assigned by the linkerH. Peter Anvin2010-02-211-2/+13
| | | | | | Use the linker to assign xfer_bug_seg and real_mode_seg. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: separate bcopyxx code and data; use linker-generated symbolsH. Peter Anvin2010-02-151-4/+18
| | | | | | | | Separate out bcopyxx code and data, and use linker-generated barrier symbols instead of inline label hacks. This makes it possible to link code into the bcopyxx area if need be. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'master' into pathbasedsyslinux-4.00-pre20H. Peter Anvin2010-02-141-7/+3
|\ | | | | | | | | | | | | | | | | | | Resolved Conflicts: com32/Makefile com32/include/syslinux/pxe.h core/pxelinux.asm core/syslinux.ld Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * pxelinux: move the stack to avoid AMI BIOS bugH. Peter Anvin2010-02-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | There is apparently some AMI BIOSes which leave a BEV stack just below 7c00h, which means that they can't return from the PXE NBP. Thus, for PXELINUX, move the stack down a few kilobytes. This particularly refers to the "rouilj/ops12" system my private sysdump archive. Reported-and-tested-by: John Rouillard <rouilj@renesys.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: move the generated IDT stubs to a separate .gentext16 sectionH. Peter Anvin2009-09-021-1/+13
| | | | | | | | | | | | | | | | Move the generated IDT stubs to a separate section, .gentext16, so that they aren't immediately adjacent to a piece of highly mutable data. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: drop any .eh_frame sectionssyslinux-4.00-pre5H. Peter Anvin2009-08-311-0/+5
| | | | | | | | | | | | We have no use of .eh_frames... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: include exported symbol informationH. Peter Anvin2009-07-091-0/+10
| | | | | | | | | | | | | | Extract symbol table information to be exported to modules. This is a really hacky way of doing it, so replace it later. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | syslinux.ld: add support for .ctors and .dtorsH. Peter Anvin2009-07-081-2/+22
| | | | | | | | | | | | | | We're going to need at least constructors when we start linking in com32 library code in a serious way. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: give 64K to the PM stackH. Peter Anvin2009-07-071-2/+2
| | | | | | | | | | | | Give a full aligned 64K chunk for the PM stack. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: move xfer_buf_seg to segment 3, and add a collision assertH. Peter Anvin2009-06-021-0/+4
| | | | | | | | | | | | | | | | | | | | Move the xfer_buf_seg to segment 3 (0x30000) for now; this is more generous than I hope we will use but makes development easier. Add an assert to the linker script that the .auxseg/.lowmem segments don't collide with xfer_buf_seg. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: handle section aliases in ld script; increase STACK32_LENH. Peter Anvin2009-06-021-4/+11
| | | | | | | | | | | | | | Handle aliases that gcc generates in the ld script. Increase STACK32_LEN to something a little more reasonable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: add new __lowmem macro to allocate a static lowmem bufferH. Peter Anvin2009-06-021-3/+18
| | | | | | | | | | | | | | | | | | Add a new __lowmem macro that can be applied to an uninitialized static (or global) object, which allocates it in a new .lowmem section allocated below the 1 MB boundary. Keep in mind that low memory is precious! Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | syslinux.ld: add a .got to the linker scriptH. Peter Anvin2009-05-311-0/+11
| | | | | | | | | | | | | | Add a .got section to the linker script, to cope with PIE code imported from libcom32. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Align free_high_memory to a 64K boundaryH. Peter Anvin2009-05-241-1/+1
| | | | | | | | | | | | | | There might be some minor performance gains from aligning free_high_memory to a 64K boundary... so we might as well do so. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Avoid clobbering PM code when loading the kernelH. Peter Anvin2009-05-241-2/+2
| | | | | | | | | | | | | | We can't safely use 1 MB to directly load the kernel, so shift the kernel just as we do when loading low. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: load the PM code at 1 MB, COM32R code followsH. Peter Anvin2009-05-241-2/+6
| | | | | | | | | | | | | | Load our own (core) PM code at 1 MB; when loading a COM32R module let it follow our own PM code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: LZO compress the PM part of the coreH. Peter Anvin2009-05-201-0/+9
| | | | | | | | | | | | | | | | Use LZO to compress the PM part of the core. LZO is not the best compression algorithm, but it is very fast, and the decompressor is only 447 bytes long. The LZO code is part of the LZO 2.03 library. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: fill unused space in .text with NOP not zeroH. Peter Anvin2009-05-191-0/+1
| | | | | | | | | | | | Fill unused space in the .text section with NOP, not with zero. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: move 32-bit code out of the .text16 segmentH. Peter Anvin2009-05-171-0/+14
| | | | | | | | | | | | | | | | | | Move all 32-bit code out of the .text16 segment. The code that is used during the relocation of the .text segment (i.e. anywhere on the bcopy path) is moved to .textnr (other than the code already in .bcopyxx) for "no relocate", the rest of the code to .text. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: make auxseg a piece of address space assigned by the linkerH. Peter Anvin2009-05-151-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Let the linker assign a place for the auxseg using normal linking rules. Place it between the main 16-bit and 32-bit code. Eventually the fontbuf will probably move into the 32-bit bss. This also avoids the weirdly aligned real_mode_seg. In the future, expect xfer_buf_seg and real_mode_seg to merge into a single 16-bit bounce buffer and cache_seg to go away. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: syslinux.ld: explicitly mark .adv and .uibss as NOLOADH. Peter Anvin2009-05-141-2/+2
| | | | | | | | | | | | | | | | Explicitly mark the .adv and .uibss sections as NOLOAD; this seems to avoid a linker error for reasons (VMA of these sections colliding with the LMA of the 32-bit code.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | First cut of doing 32-bit C code in the coreH. Peter Anvin2009-05-141-15/+81
| | | | | | | | | | | | | | | | | | A very preliminary implementation of 32-bit C code in the core. This currently breaks ADV, because the installer assumes the ADV is the last two sectors in extlinux.sys -- need to figure out a way to deal with this hopefully without breaking the migration protocol. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: rename .text, .data and .bss to .text16, .data16, .bss16unify-pmH. Peter Anvin2009-05-131-20/+18
| | | | | | | | | | | | | | | | Rename the .text, .data and .bss sections to .text16, .data16 and .bss16, in anticipation of being linked with compiler-generated 32-bit code, which presumably would like to use the standard section names. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: zero bss and uibss; fix some section confusionsH. Peter Anvin2009-05-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | Set .bss and .uibss as soon as we are fully loaded. This gives us the more familiar behavior of most normal execution environments. The .earlybss section is not zeroed; therefore, all variables that are set before we have the opportunity to zero need to go in this section. This checkin also fixes some incorrect section directives. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: move initial code to a new .init segment; unify .bss+.bss1H. Peter Anvin2009-05-131-9/+11
|/ | | | | | | | | Move code used before loading is complete to a new .init segment; .text is now only the stuff that is used at any time. Move the .bss1 segment down to where .bss and .bss2 already are; it seems to fit better there now. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* shuffler: work around KVM problem with the new shufflerH. Peter Anvin2009-04-131-1/+14
| | | | | | | | | | | | | | KVM uses V86 mode to simulate real mode. This causes problems with the new shuffler. This changes the shuffler handover to be in 16-bit protected mode instead, and requires the stub to do the actual entry to real mode. For the KVM hack to work, all segments must have: (seg.base & 0xfff0000f) == 0 && seg.limit == 0xffff As a result, we have to make sure the real-mode entry stub is paragraph-aligned, lest we violate the first criterion. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* syslinux.ld: fix comment syntaxH. Peter Anvin2009-04-041-12/+12
| | | | | | Fix build failure due to incorrect comment syntax in syslinux.ld. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Update copyright noticesH. Peter Anvin2009-04-041-0/+13
| | | | Update copyright notices; add Intel copyright notices where appropriate.
* shuffler: first cut of a simpler shuffle routineH. Peter Anvin2009-03-311-21/+19
| | | | | | | | | | | | Impact: major restructuring New shuffler routine which runs entirely in protected mode, unlike the old one which would enter PM for the bcopy phase only. This is not only faster, but it greatly reduces the size of the shuffler "critical area". The interfaces to this new shuffler are not yet implemented, so this is a non-functional checkpoint. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Ugly workaround for bug in GNU ld 2.17H. Peter Anvin2008-06-231-0/+5
| | | | | | | GNU ld 2.17, which is still included with Debian 4.0 (etch), mishandles PC-relative relocations to an absolute address. Hack around it by making pm_entry a segment-relative symbol, completely unnecessarily so.
* Whitespace cleanupH. Peter Anvin2008-06-091-2/+2
|
* core: fail the link if we push above the 64K pointH. Peter Anvin2008-06-051-0/+2
| | | | If the base section stuff exceeds 64K, then fail.
* Move files out of root into core, dos, and utilsH. Peter Anvin2008-05-291-0/+119
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.