[i386] Simplify linker script and standardise linker-defined symbol names

Reduce the number of sections within the linker script to match the
number of practical sections within the output file.

Define _section, _msection, _esection, _section_filesz, _section_memsz,
and _section_lma for each section, replacing the mixture of symbols that
previously existed.

In particular, replace _text and _end with _textdata and _etextdata, to
make it explicit within code that uses these symbols that the .text and
.data sections are always treated as a single contiguous block.
This commit is contained in:
Michael Brown
2008-10-09 22:22:01 +01:00
parent 3029eb0e84
commit 13d09e6719
11 changed files with 153 additions and 236 deletions

View File

@@ -44,10 +44,10 @@ ppxe:
.byte SegDescCnt /* SegDescCnt */
.word 0 /* FirstSelector */
pxe_segments:
.word 0, 0, 0, _data16_size /* Stack */
.word 0, 0, 0, _data16_size /* UNDIData */
.word 0, 0, 0, _text16_size /* UNDICode */
.word 0, 0, 0, _text16_size /* UNDICodeWrite */
.word 0, 0, 0, _data16_memsz /* Stack */
.word 0, 0, 0, _data16_memsz /* UNDIData */
.word 0, 0, 0, _text16_memsz /* UNDICode */
.word 0, 0, 0, _text16_memsz /* UNDICodeWrite */
.word 0, 0, 0, 0 /* BC_Data */
.word 0, 0, 0, 0 /* BC_Code */
.word 0, 0, 0, 0 /* BC_CodeWrite */
@@ -76,15 +76,15 @@ pxenv:
.long 0 /* PMEntry */
.word 0 /* PMSelector */
.word 0 /* StackSeg */
.word _data16_size /* StackSize */
.word _data16_memsz /* StackSize */
.word 0 /* BC_CodeSeg */
.word 0 /* BC_CodeSize */
.word 0 /* BC_DataSeg */
.word 0 /* BC_DataSize */
.word 0 /* UNDIDataSeg */
.word _data16_size /* UNDIDataSize */
.word _data16_memsz /* UNDIDataSize */
.word 0 /* UNDICodeSeg */
.word _text16_size /* UNDICodeSize */
.word _text16_memsz /* UNDICodeSize */
.word ppxe, 0 /* PXEPtr */
.equ pxenv_length, . - pxenv
.size pxenv, . - pxenv