Skip to content

Commit d6f1dda

Browse files
committed
layout.ld: Only use spaces (not tabs)
We are currently using a mixture of tabs and spaces, this is silly. Signed-off-by: Joe Richey <[email protected]>
1 parent 1634ee6 commit d6f1dda

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

layout.ld

+40-40
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,48 @@ ram_min = 1M;
1111

1212
SECTIONS
1313
{
14-
/* Mapping the program headers and note into RAM makes the file smaller. */
15-
. = ram_min;
16-
. += SIZEOF_HEADERS;
17-
.note : { *(.note) } :note :ram
14+
/* Mapping the program headers and note into RAM makes the file smaller. */
15+
. = ram_min;
16+
. += SIZEOF_HEADERS;
17+
.note : { *(.note) } :note :ram
1818

19-
/* These sections are mapped into RAM from the file. Omitting :ram from
20-
later sections avoids emitting empty sections in the final binary. */
21-
data_start = .;
22-
.rodata : { *(.rodata .rodata.*) } :ram
23-
.text : { *(.text .text.*) }
24-
.text32 : { *(.text32) }
25-
.data : { *(.data .data.*) }
26-
data_size = . - data_start;
19+
/* These sections are mapped into RAM from the file. Omitting :ram from
20+
later sections avoids emitting empty sections in the final binary. */
21+
data_start = .;
22+
.rodata : { *(.rodata .rodata.*) } :ram
23+
.text : { *(.text .text.*) }
24+
.text32 : { *(.text32) }
25+
.data : { *(.data .data.*) }
26+
data_size = . - data_start;
2727

28-
/* The BSS section isn't mapped from file data. It is just zeroed in RAM. */
29-
.bss : {
30-
bss_start = .;
31-
*(.bss .bss.*)
32-
bss_size = . - bss_start;
33-
}
28+
/* The BSS section isn't mapped from file data. It is just zeroed in RAM. */
29+
.bss : {
30+
bss_start = .;
31+
*(.bss .bss.*)
32+
bss_size = . - bss_start;
33+
}
3434

35-
/* Our stack grows down and is page-aligned. TODO: Add stack guard pages. */
36-
.stack (NOLOAD) : ALIGN(4K) { . += 64K; }
37-
stack_start = .;
38-
/* ram32.s only maps the first 2 MiB, and that must include the stack. */
39-
ASSERT((. <= 2M), "Stack overflows initial identity-mapped memory region")
35+
/* Our stack grows down and is page-aligned. TODO: Add stack guard pages. */
36+
.stack (NOLOAD) : ALIGN(4K) { . += 64K; }
37+
stack_start = .;
38+
/* ram32.s only maps the first 2 MiB, and that must include the stack. */
39+
ASSERT((. <= 2M), "Stack overflows initial identity-mapped memory region")
4040

41-
/* Match edk2's GccBase.lds DISCARD section */
42-
/DISCARD/ : {
43-
*(.note.GNU-stack)
44-
*(.gnu_debuglink)
45-
*(.interp)
46-
*(.dynsym)
47-
*(.dynstr)
48-
*(.dynamic)
49-
*(.hash .gnu.hash)
50-
*(.comment)
51-
*(COMMON)
52-
}
53-
/* Strip symbols from the output binary (comment out to get symbols) */
54-
/DISCARD/ : {
55-
*(.symtab)
56-
*(.strtab)
57-
}
41+
/* Match edk2's GccBase.lds DISCARD section */
42+
/DISCARD/ : {
43+
*(.note.GNU-stack)
44+
*(.gnu_debuglink)
45+
*(.interp)
46+
*(.dynsym)
47+
*(.dynstr)
48+
*(.dynamic)
49+
*(.hash .gnu.hash)
50+
*(.comment)
51+
*(COMMON)
52+
}
53+
/* Strip symbols from the output binary (comment out to get symbols) */
54+
/DISCARD/ : {
55+
*(.symtab)
56+
*(.strtab)
57+
}
5858
}

0 commit comments

Comments
 (0)