summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-07-27 21:30:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-07-27 21:30:38 -0700
commit267a5ffb154b0f498b5fa0e072a44ab66ba738b0 (patch)
tree6f0675a01acedabd40ff6880244e537ffff63bb7
parent2a308027cd680494288ea9b4614839be4c4ea95b (diff)
downloadsamples-267a5ffb154b0f498b5fa0e072a44ab66ba738b0.tar.gz
samples-267a5ffb154b0f498b5fa0e072a44ab66ba738b0.tar.xz
samples-267a5ffb154b0f498b5fa0e072a44ab66ba738b0.zip
exe.ld: clean up indentation
-rw-r--r--exe.ld137
1 files changed, 71 insertions, 66 deletions
diff --git a/exe.ld b/exe.ld
index f0d1a70..56363d8 100644
--- a/exe.ld
+++ b/exe.ld
@@ -5,7 +5,7 @@ SECTIONS
{
/*
* The PSP is really at offset -256, but that drives the
- * current version of ld crazy. Doing it this way is OK *if
+ * current version of ld crazy. Doing it this way is OK *if
* and only if* we don't care about 32-bit (R_386_32)
* relocations producing correct results. Pure MZ EXE files
* don't support 32-bit relocations anyway, so this is OK for
@@ -39,12 +39,12 @@ SECTIONS
}
DGROUP : {
- *(!DGROUP _*DATA*!* _BSS*!* _STACK*!*)
- PROVIDE(___data_start! = .);
- PROVIDE(___bss_start! = .);
- PROVIDE(___bss_end! = .);
- PROVIDE(___stack_start! = .);
- PROVIDE(___stack_end! = .);
+ *(!DGROUP _*DATA*!* _BSS*!* _STACK*!*)
+ PROVIDE(___data_start! = .);
+ PROVIDE(___bss_start! = .);
+ PROVIDE(___bss_end! = .);
+ PROVIDE(___stack_start! = .);
+ PROVIDE(___stack_end! = .);
}
PROVIDE(___data_start = .);
@@ -96,48 +96,53 @@ SECTIONS
* segment, so we remove it in postprocessing.
*/
- /* PIE linking: give us all the dynamic data including relocations */
- .dynamic : {
- /* Special DT tags used by elf2exe */
-
- /* Final file size */
- LONG(0x6bb31700);
- LONG(___.filesize);
-
- /* Final memory size */
- LONG(0x6bb31701);
- LONG(___.end); /* Final memory size */
-
- /* Seg:off form of entry point */
- LONG(0x6bb31702);
- SHORT(___start - "___start!");
- SHORT("___start!" >> 4);
-
- /* Seg:off form of the initial stack pointer */
- LONG(0x6bb31703);
- SHORT(___stack_end - "___stack_end!");
- SHORT("___stack_end!" >> 4);
-
- /*
- * Base of the stack (usable as temp storage
- * as it does not need to be zeroed.)
- */
- LONG(0x6bb31704);
- LONG(___stack_start);
-
- /* Size of the stack */
- LONG(0x6bb31705);
- LONG(___stack_size);
-
- KEEP(*(.dynamic))
-
- /*
- * Make sure the dynamic structure is terminated. This
- * may be redundant with linker-generated data, but won't
- * hurt; the worst case is 8 bytes wasted.
- */
- LONG(0);
- LONG(0);
+ /* PIE linking: give us all the dynamic data including relocations */
+ .dynamic : {
+ /* Special DT tags used by elf2exe */
+
+ /* Final file size */
+ LONG(0x6bb31700);
+ LONG(___.filesize);
+
+ /* Final memory size */
+ LONG(0x6bb31701);
+ LONG(___.end); /* Final memory size */
+
+ /* Seg:off form of entry point */
+ LONG(0x6bb31702);
+ SHORT(___start - "___start!");
+ SHORT("___start!" >> 4);
+
+ /* Seg:off form of the initial stack pointer */
+ LONG(0x6bb31703);
+ SHORT(___stack_end - "___stack_end!");
+ SHORT("___stack_end!" >> 4);
+
+ /*
+ * Base of the stack (usable as temp storage
+ * as it does not need to be zeroed.)
+ */
+ LONG(0x6bb31704);
+ LONG(___stack_start);
+
+ /*
+ * Segment base of the stack
+ */
+ LONG("___stack_end!");
+
+ /* Size of the stack */
+ LONG(0x6bb31705);
+ LONG(___stack_size);
+
+ KEEP(*(.dynamic))
+
+ /*
+ * Make sure the dynamic structure is terminated. This
+ * may be redundant with linker-generated data, but won't
+ * hurt; the worst case is 8 bytes wasted.
+ */
+ LONG(0);
+ LONG(0);
}
.dynsym : { KEEP(*(.dynsym)) }
.dynstr : { KEEP(*(.dynstr)) }
@@ -145,7 +150,7 @@ SECTIONS
.rel.dyn : { KEEP(*(.rel*)) }
/* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
+ .stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
@@ -157,33 +162,33 @@ SECTIONS
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
/* DWARF 3 */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
- .debug_ranges 0 : { *(.debug_ranges) }
+ .debug_ranges 0 : { *(.debug_ranges) }
/* DWARF Extension. */
- .debug_macro 0 : { *(.debug_macro) }
- .debug_addr 0 : { *(.debug_addr) }
+ .debug_macro 0 : { *(.debug_macro) }
+ .debug_addr 0 : { *(.debug_addr) }
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
/DISCARD/ : {
*(.note.GNU-stack)