From c0e6f47b3219e27ba23a1bc4d19696e6d19d1682 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 2 Jun 2009 16:56:57 -0700 Subject: [PATCH] core: handle section aliases in ld script; increase STACK32_LEN Handle aliases that gcc generates in the ld script. Increase STACK32_LEN to something a little more reasonable. Signed-off-by: H. Peter Anvin --- core/layout.inc | 2 +- core/syslinux.ld | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/layout.inc b/core/layout.inc index 7223683..ded0bf3 100644 --- a/core/layout.inc +++ b/core/layout.inc @@ -81,7 +81,7 @@ RBFG_brainfuck: resb 2048 ; Bigger than an Ethernet packet... SECINFO pm_code SECINFO high_clear - extern __bss_start, __bss_end, __bss_len, __bss_dwords + SECINFO bss extern free_high_memory diff --git a/core/syslinux.ld b/core/syslinux.ld index b931ed2..44d3b54 100644 --- a/core/syslinux.ld +++ b/core/syslinux.ld @@ -20,8 +20,8 @@ OUTPUT_ARCH(i386) EXTERN(_start) ENTRY(_start) -STACK16_LEN = 4096; -STACK32_LEN = 8192; +STACK16_LEN = 4096; +STACK32_LEN = 32768; SECTIONS { @@ -219,6 +219,7 @@ SECTIONS FILL(0x90909090) __text_start = .; *(.text) + *(.text.*) __text_end = .; } @@ -229,6 +230,7 @@ SECTIONS .rodata : AT(__rodata_lma) { __rodata_start = .; *(.rodata) + *(.rodata.*) __rodata_end = .; } @@ -250,6 +252,7 @@ SECTIONS .data : AT(__data_lma) { __data_start = .; *(.data) + *(.data.*) __data_end = .; } @@ -260,9 +263,12 @@ SECTIONS . = ALIGN(128); __bss_vma = .; - .bss : AT (__bss_vma) { + __bss_lma = .; /* Dummy */ + .bss (NOLOAD) : AT (__bss_lma) { __bss_start = .; *(.bss) + *(.bss.*) + *(COMMON) __bss_end = .; } __bss_len = __bss_end - __bss_start; @@ -272,7 +278,8 @@ SECTIONS /* XXX: This stack should be unified with the COM32 stack */ __stack_vma = .; - .stack : AT(__stack_vma) { + __stack_lma = .; /* Dummy */ + .stack (NOLOAD) : AT(__stack_lma) { __stack_start = .; . += STACK32_LEN; __stack_end = .; -- 2.7.4