[build] Remove obsolete linker script files
This commit is contained in:
parent
f721067d35
commit
3d6b8a67f2
|
@ -1,100 +0,0 @@
|
||||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
|
||||||
OUTPUT_ARCH(i386)
|
|
||||||
|
|
||||||
ENTRY(_prefix_start)
|
|
||||||
SECTIONS {
|
|
||||||
/* Prefix */
|
|
||||||
.prefix : {
|
|
||||||
_verbatim_start = . ;
|
|
||||||
_prefix_start = . ;
|
|
||||||
*(.prefix)
|
|
||||||
. = ALIGN(16);
|
|
||||||
_prefix_end = . ;
|
|
||||||
} = 0x9090
|
|
||||||
_prefix_size = _prefix_end - _prefix_start;
|
|
||||||
|
|
||||||
.text.nocompress : {
|
|
||||||
*(.prefix.udata)
|
|
||||||
} = 0x9090
|
|
||||||
|
|
||||||
decompress_to = . ;
|
|
||||||
.prefix.zdata : {
|
|
||||||
_compressed = . ;
|
|
||||||
*(.prefix.zdata)
|
|
||||||
_compressed_end = . ;
|
|
||||||
}
|
|
||||||
_compressed_size = _compressed_end - _compressed;
|
|
||||||
|
|
||||||
. = ALIGN(16);
|
|
||||||
_verbatim_end = . ;
|
|
||||||
|
|
||||||
|
|
||||||
/* Size of the core of etherboot in memory */
|
|
||||||
_base_size = _end - _text;
|
|
||||||
|
|
||||||
/* _prefix_size is the length of the non-core etherboot prefix */
|
|
||||||
_prefix_size = _prefix_end - _prefix_start;
|
|
||||||
|
|
||||||
/* _verbatim_size is the actual amount that has to be copied to base memory */
|
|
||||||
_verbatim_size = _verbatim_end - _verbatim_start;
|
|
||||||
|
|
||||||
/* _image_size is the amount of base memory needed to run */
|
|
||||||
_image_size = _base_size + _prefix_size;
|
|
||||||
|
|
||||||
/* Standard sizes rounded up to paragraphs */
|
|
||||||
_prefix_size_pgh = (_prefix_size + 15) / 16;
|
|
||||||
_verbatim_size_pgh = (_verbatim_size + 15) / 16;
|
|
||||||
_image_size_pgh = (_image_size + 15) / 16 ;
|
|
||||||
|
|
||||||
/* Standard sizes in sectors */
|
|
||||||
_prefix_size_sct = (_prefix_size + 511) / 512;
|
|
||||||
_verbatim_size_sct = (_verbatim_size + 511) / 512;
|
|
||||||
_image_size_sct = (_image_size + 511) / 512;
|
|
||||||
|
|
||||||
/* Symbol offsets and sizes for the exe prefix */
|
|
||||||
_exe_hdr_size = 32;
|
|
||||||
_exe_size = _verbatim_size; /* Should this be - 32 to exclude the header? */
|
|
||||||
_exe_size_tail = (_exe_size) % 512;
|
|
||||||
_exe_size_pages = ((_exe_size) + 511) / 512;
|
|
||||||
_exe_bss_size = ((_image_size - _verbatim_size) + 15) / 16;
|
|
||||||
_exe_ss_offset = (_stack_offset + _prefix_size - _exe_hdr_size + 15) / 16 ;
|
|
||||||
|
|
||||||
/* This is where we copy the compressed image before decompression.
|
|
||||||
* Prepare to decompress in place. The end mark is about 8.25 bytes long,
|
|
||||||
* and the worst case symbol is about 16.5 bytes long. Therefore
|
|
||||||
* We need to reserve at least 25 bytes of slack here.
|
|
||||||
* Currently I reserve 2048 bytes of just slack to be safe :)
|
|
||||||
* 2048 bytes easily falls within the BSS (the defualt stack is 4096 bytes)
|
|
||||||
* so we really are decompressing in place.
|
|
||||||
*
|
|
||||||
* Hmm. I missed a trick. In the very worst case (no compression)
|
|
||||||
* the encoded data is 9/8 the size as it started out so to be completely
|
|
||||||
* safe I need to be 1/8 of the uncompressed code size past the end.
|
|
||||||
* This will still fit compfortably into our bss in any conceivable scenario.
|
|
||||||
*/
|
|
||||||
_compressed_copy = _edata + _prefix_size - _compressed_size +
|
|
||||||
/* The amount to overflow _edata */
|
|
||||||
MAX( ((_edata - _text + 7) / 8) , 2016 ) + 32;
|
|
||||||
_assert = ASSERT( ( _compressed_copy - _prefix_size ) < _ebss , "Cannot decompress in place" ) ;
|
|
||||||
|
|
||||||
decompress = DEFINED(decompress) ? decompress : 0;
|
|
||||||
/DISCARD/ : {
|
|
||||||
*(.comment)
|
|
||||||
*(.note)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Symbols used by the prefixes whose addresses are inconvinient
|
|
||||||
* to compute, at runtime in the code.
|
|
||||||
*/
|
|
||||||
image_basemem_size = DEFINED(image_basemem_size)? image_basemem_size : 65536;
|
|
||||||
image_basemem = DEFINED(image_basemem)? image_basemem : 65536;
|
|
||||||
_prefix_real_to_prot = _real_to_prot + _prefix_size ;
|
|
||||||
_prefix_prot_to_real = _prot_to_real + _prefix_size ;
|
|
||||||
_prefix_image_basemem_size = image_basemem_size + _prefix_size ;
|
|
||||||
_prefix_image_basemem = image_basemem + _prefix_size ;
|
|
||||||
_prefix_rm_in_call = _rm_in_call + _prefix_size ;
|
|
||||||
_prefix_in_call = _in_call + _prefix_size ;
|
|
||||||
_prefix_rom = rom + _prefix_size ;
|
|
||||||
_prefix_rm_etherboot_location = rm_etherboot_location + _prefix_size ;
|
|
||||||
_prefix_stack_end = _stack_end + _prefix_size ;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
|
||||||
OUTPUT_ARCH(i386)
|
|
||||||
|
|
||||||
SECTIONS {
|
|
||||||
.prefix.udata : {
|
|
||||||
*(*)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
|
||||||
OUTPUT_ARCH(i386)
|
|
||||||
|
|
||||||
SECTIONS {
|
|
||||||
.prefix.zdata : {
|
|
||||||
*(*)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
/* When linking with an uncompressed image, these symbols are not
|
|
||||||
* defined so we provide them here.
|
|
||||||
*/
|
|
||||||
|
|
||||||
__decompressor_uncompressed = 0 ;
|
|
||||||
__decompressor__start = 0 ;
|
|
||||||
|
|
||||||
INCLUDE arch/i386/core/start16z.lds
|
|
|
@ -1,65 +0,0 @@
|
||||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
|
||||||
OUTPUT_ARCH(i386)
|
|
||||||
|
|
||||||
/* Linker-generated symbols are prefixed with a double underscore.
|
|
||||||
* Decompressor symbols are prefixed with __decompressor_. All other
|
|
||||||
* symbols are the same as in the original object file, i.e. the
|
|
||||||
* runtime addresses.
|
|
||||||
*/
|
|
||||||
|
|
||||||
ENTRY(_start16)
|
|
||||||
|
|
||||||
SECTIONS {
|
|
||||||
.text : {
|
|
||||||
*(.text)
|
|
||||||
}
|
|
||||||
.payload : {
|
|
||||||
__payload_start = .;
|
|
||||||
*(.data)
|
|
||||||
__payload_end = .;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* _payload_size is the size of the binary image appended to
|
|
||||||
* start16, in bytes.
|
|
||||||
*/
|
|
||||||
__payload_size = __payload_end - __payload_start ;
|
|
||||||
|
|
||||||
/* _size is the size of the runtime image
|
|
||||||
* (start32 + the C code), in bytes.
|
|
||||||
*/
|
|
||||||
__size = _end - _start ;
|
|
||||||
|
|
||||||
/* _decompressor_size is the size of the decompressor, in
|
|
||||||
* bytes. For a non-compressed image, start16.lds sets
|
|
||||||
* _decompressor_uncompressed = _decompressor__start = 0.
|
|
||||||
*/
|
|
||||||
__decompressor_size = __decompressor_uncompressed - __decompressor__start ;
|
|
||||||
|
|
||||||
/* image__size is the total size of the image, after
|
|
||||||
* decompression and including the decompressor if applicable.
|
|
||||||
* It is therefore the amount of memory that start16's payload
|
|
||||||
* needs in order to execute, in bytes.
|
|
||||||
*/
|
|
||||||
__image_size = __size + __decompressor_size ;
|
|
||||||
|
|
||||||
/* Amount to add to runtime symbols to obtain the offset of
|
|
||||||
* that symbol within the image.
|
|
||||||
*/
|
|
||||||
__offset_adjust = __decompressor_size - _start ;
|
|
||||||
|
|
||||||
/* Calculations for the stack
|
|
||||||
*/
|
|
||||||
__stack_size = _estack - _stack ;
|
|
||||||
__offset_stack = _stack + __offset_adjust ;
|
|
||||||
|
|
||||||
/* Some symbols will be larger than 16 bits but guaranteed to
|
|
||||||
* be multiples of 16. We calculate them in paragraphs and
|
|
||||||
* export these symbols which can be used in 16-bit code
|
|
||||||
* without risk of overflow.
|
|
||||||
*/
|
|
||||||
__image_size_pgh = ( __image_size / 16 );
|
|
||||||
__start_pgh = ( _start / 16 );
|
|
||||||
__decompressor_size_pgh = ( __decompressor_size / 16 );
|
|
||||||
__offset_stack_pgh = ( __offset_stack / 16 );
|
|
||||||
}
|
|
||||||
|
|
Reference in New Issue