[arm] fix problem with gcc 4.4 to ensure the boot code is in the binary

seems that gcc 4.4 or the newer binutils likes to put linker generated
shims first in link order. Tweak the boot code to use a special section
that is ordered first by the linker script.
This commit is contained in:
Travis Geiselbrecht
2009-04-24 11:45:25 -07:00
parent 7760c7782a
commit 33c82250a5
3 changed files with 9 additions and 7 deletions

View File

@@ -20,7 +20,7 @@
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
.text
.section ".text.boot"
.globl _start
_start:
b reset

View File

@@ -6,6 +6,10 @@ SECTIONS
{
. = %MEMBASE%;
/* text/read-only data */
.text.boot : { *(.text.boot) }
.text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
@@ -33,9 +37,6 @@ SECTIONS
.init : { *(.init) } =0x9090
.plt : { *(.plt) }
/* text/read-only data */
.text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090
.rodata : {
*(.rodata .rodata.* .gnu.linkonce.r.*)
. = ALIGN(4);

View File

@@ -6,6 +6,10 @@ SECTIONS
{
. = %ROMBASE%;
/* text/read-only data */
.text.boot : { *(.text.boot) }
.text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
@@ -33,9 +37,6 @@ SECTIONS
.init : { *(.init) } =0x9090
.plt : { *(.plt) }
/* text/read-only data */
.text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090
.rodata : {
*(.rodata .rodata.* .gnu.linkonce.r.*)
. = ALIGN(4);