From: Erik M. <er...@us...> - 2002-02-07 23:08:03
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv12890 Modified Files: Makefile.am rest-ld-script.in Removed Files: stack.S Log Message: Fix bug with new GNU linkers outputting the .bss section. Old GNU linkers let the section attributes of the output section take precedence over the input section attributes, new GNU linkers do it the other way around. The .bss section only needs to be allocated, but if you put a .stack section in it that is CONTENTS+(whatever), the new linkers will promote the output .bss section to CONTENTS+(whatever) and hence the output section won't be discarded. This patch fixes it by directly allocating the necessary stack space in the linker script. Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Makefile.am 4 Feb 2002 18:02:42 -0000 1.21 +++ Makefile.am 7 Feb 2002 22:56:22 -0000 1.22 @@ -123,7 +123,6 @@ blob_rest_elf32_SOURCES = \ trampoline.S \ flashasm.S \ - stack.S \ testmem2.S \ bootldrpart.c \ commands.c \ Index: rest-ld-script.in =================================================================== RCS file: /cvsroot/blob/blob/src/blob/rest-ld-script.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rest-ld-script.in 7 Jan 2002 15:00:15 -0000 1.2 +++ rest-ld-script.in 7 Feb 2002 22:56:22 -0000 1.3 @@ -92,12 +92,16 @@ .bss : { __bss_start = .; /* first the real BSS data */ - *(.bss) + *(.bss) + *(COMMON) /* and next the stack */ . = ALIGN(4); __stack_start = .; - *(.stack) + + /* allocate an 8kB stack */ + . = . + 8 * 1024; + __stack_end = .; __bss_end = .; } --- stack.S DELETED --- |