瀏覽代碼

[i386] Add explicit ""aw", @nobits" declarations to stack sections

As reported by Stefan, commit 13d09e6 ("[i386] Simplify linker script
and standardise linker-defined symbol names") breaks gdb, readelf and
associated utilities.

This is caused by the .stack section overwriting a block in the middle
of the .debug_info section (despite being included in the
.bss.textdata section in the output file, which apparently has the
correct attributes for a .bss section).

Fixed by adding explicit flags and type to the stack section
declaration.
tags/v0.9.7
Michael Brown 15 年之前
父節點
當前提交
ce2aa66d39
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      src/arch/i386/core/stack.S
  2. 1
    1
      src/arch/i386/core/stack16.S

+ 1
- 1
src/arch/i386/core/stack.S 查看文件

@@ -4,7 +4,7 @@
4 4
  * Internal stack
5 5
  ****************************************************************************
6 6
  */
7
-	.section ".stack"
7
+	.section ".stack", "aw", @nobits
8 8
 	.align 8
9 9
 	.globl _stack
10 10
 _stack:

+ 1
- 1
src/arch/i386/core/stack16.S 查看文件

@@ -4,7 +4,7 @@
4 4
  * Internal stack
5 5
  ****************************************************************************
6 6
  */
7
-	.section ".stack16"
7
+	.section ".stack16", "aw", @nobits
8 8
 	.align 8
9 9
 	.globl _stack16
10 10
 _stack16:

Loading…
取消
儲存