mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-14 01:14:27 +02:00
ia16-elf-gcc: use special .msdos_mz_{hdr, reloc} section names
recognized by my recent (post-20 Mar 2018) binutils-ia16 patches
This commit is contained in:
parent
fe57c89061
commit
fdbea16132
@ -4,7 +4,7 @@
|
|||||||
OUTPUT_FORMAT(binary)
|
OUTPUT_FORMAT(binary)
|
||||||
|
|
||||||
DOS_PSP = 0x60;
|
DOS_PSP = 0x60;
|
||||||
MEMOFS = DOS_PSP * 16 - SIZEOF(.hdr);
|
MEMOFS = DOS_PSP * 16 - SIZEOF(.msdos_mz_hdr);
|
||||||
|
|
||||||
/* these GROUPs play the same role as GROUPS (segments) in OMF */
|
/* these GROUPs play the same role as GROUPS (segments) in OMF */
|
||||||
PGROUP = (MEMOFS + LOADADDR(.ptext)) / 16;
|
PGROUP = (MEMOFS + LOADADDR(.ptext)) / 16;
|
||||||
@ -22,7 +22,7 @@ SECTIONS
|
|||||||
/* Fabricate a .exe header here. Although libbfd does have an
|
/* Fabricate a .exe header here. Although libbfd does have an
|
||||||
"i386msdos" back-end which produces an "MZ" exe header, it cannot do
|
"i386msdos" back-end which produces an "MZ" exe header, it cannot do
|
||||||
certain things (yet). */
|
certain things (yet). */
|
||||||
.hdr : {
|
.msdos_mz_hdr : {
|
||||||
/* Signature. */
|
/* Signature. */
|
||||||
SHORT (0x5a4d)
|
SHORT (0x5a4d)
|
||||||
/* Bytes in last 512-byte page. */
|
/* Bytes in last 512-byte page. */
|
||||||
@ -30,9 +30,9 @@ SECTIONS
|
|||||||
/* Total number of 512-byte pages. */
|
/* Total number of 512-byte pages. */
|
||||||
SHORT (ALIGN(LOADADDR (.ibss), 512) / 512)
|
SHORT (ALIGN(LOADADDR (.ibss), 512) / 512)
|
||||||
/* Relocation entries. */
|
/* Relocation entries. */
|
||||||
SHORT (0)
|
SHORT ((__msdos_mz_rel_end - __msdos_mz_rel_start) / 4)
|
||||||
/* Header size in paragraphs. */
|
/* Header size in paragraphs. */
|
||||||
SHORT (SIZEOF(.hdr) / 16)
|
SHORT (SIZEOF(.msdos_mz_hdr) / 16)
|
||||||
/* Minimum extra paragraphs. */
|
/* Minimum extra paragraphs. */
|
||||||
SHORT (ALIGN(SIZEOF (.ibss) + SIZEOF(.istack), 16) / 16)
|
SHORT (ALIGN(SIZEOF (.ibss) + SIZEOF(.istack), 16) / 16)
|
||||||
/* Maximum extra paragraphs. */
|
/* Maximum extra paragraphs. */
|
||||||
@ -45,12 +45,18 @@ SECTIONS
|
|||||||
. = 0x18;
|
. = 0x18;
|
||||||
/* Relocation table offset. */
|
/* Relocation table offset. */
|
||||||
SHORT (. + 4)
|
SHORT (. + 4)
|
||||||
/* Overlay number + padding */
|
/* Overlay number */
|
||||||
. = ALIGN (32);
|
SHORT (0)
|
||||||
|
/* Relocations */
|
||||||
|
HIDDEN (__msdos_mz_rel_start = .);
|
||||||
|
*(.msdos_mz_reloc .msdos_mz_reloc.*)
|
||||||
|
HIDDEN (__msdos_mz_rel_end = .);
|
||||||
|
/* Padding */
|
||||||
|
. = ALIGN (16);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Target PSP section. */
|
/* Target PSP section. */
|
||||||
.ptext 0 : AT (SIZEOF(.hdr)) {
|
.ptext 0 : AT (SIZEOF(.msdos_mz_hdr)) {
|
||||||
*(PSP)
|
*(PSP)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user