Skip to content

Commit

Permalink
[i386] Add explicit ""aw", @nobits" declarations to stack sections
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Michael Brown committed Feb 15, 2009
1 parent 8ae1cac commit ce2aa66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/arch/i386/core/stack.S
Expand Up @@ -4,7 +4,7 @@
* Internal stack
****************************************************************************
*/
.section ".stack"
.section ".stack", "aw", @nobits
.align 8
.globl _stack
_stack:
Expand Down
2 changes: 1 addition & 1 deletion src/arch/i386/core/stack16.S
Expand Up @@ -4,7 +4,7 @@
* Internal stack
****************************************************************************
*/
.section ".stack16"
.section ".stack16", "aw", @nobits
.align 8
.globl _stack16
_stack16:
Expand Down

0 comments on commit ce2aa66

Please sign in to comment.