Max Filippov | e85e335 | 2012-12-03 15:01:43 +0400 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/xtensa/boot/boot-elf/boot.lds.S |
| 3 | * |
| 4 | * Copyright (C) 2008 - 2013 by Tensilica Inc. |
| 5 | * |
| 6 | * Chris Zankel <chris@zankel.net> |
| 7 | * Marc Gauthier <marc@tensilica.com |
| 8 | * Pete Delaney <piet@tensilica.com> |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License version 2 as |
| 12 | * published by the Free Software Foundation. |
| 13 | */ |
| 14 | |
| 15 | #include <asm/vectors.h> |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 16 | OUTPUT_ARCH(xtensa) |
Marc Gauthier | ed3174d | 2007-10-23 16:40:24 -0700 | [diff] [blame] | 17 | ENTRY(_ResetVector) |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 18 | |
| 19 | SECTIONS |
| 20 | { |
Max Filippov | e85e335 | 2012-12-03 15:01:43 +0400 | [diff] [blame] | 21 | .ResetVector.text XCHAL_RESET_VECTOR_VADDR : |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 22 | { |
Max Filippov | e85e335 | 2012-12-03 15:01:43 +0400 | [diff] [blame] | 23 | *(.ResetVector.text) |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 24 | } |
| 25 | |
Max Filippov | e85e335 | 2012-12-03 15:01:43 +0400 | [diff] [blame] | 26 | .image KERNELOFFSET: AT (LOAD_MEMORY_ADDRESS) |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 27 | { |
| 28 | _image_start = .; |
| 29 | *(image) |
| 30 | . = (. + 3) & ~ 3; |
| 31 | _image_end = . ; |
| 32 | } |
| 33 | |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 34 | .bss ((LOADADDR(.image) + SIZEOF(.image) + 3) & ~ 3): |
| 35 | { |
| 36 | __bss_start = .; |
| 37 | *(.sbss) |
| 38 | *(.scommon) |
| 39 | *(.dynbss) |
| 40 | *(.bss) |
| 41 | __bss_end = .; |
| 42 | } |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 43 | |
Max Filippov | ccd0ef3 | 2014-10-02 22:03:27 +0400 | [diff] [blame] | 44 | #ifdef CONFIG_MMU |
Max Filippov | e85e335 | 2012-12-03 15:01:43 +0400 | [diff] [blame] | 45 | /* |
| 46 | * This is a remapped copy of the Reset Vector Code. |
| 47 | * It keeps gdb in sync with the PC after switching |
| 48 | * to the temporary mapping used while setting up |
| 49 | * the V2 MMU mappings for Linux. |
| 50 | */ |
| 51 | .ResetVector.remapped_text 0x46000000 (INFO): |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 52 | { |
Max Filippov | e85e335 | 2012-12-03 15:01:43 +0400 | [diff] [blame] | 53 | *(.ResetVector.remapped_text) |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 54 | } |
Max Filippov | ccd0ef3 | 2014-10-02 22:03:27 +0400 | [diff] [blame] | 55 | #endif |
Chris Zankel | 4bedea9 | 2005-06-23 22:01:12 -0700 | [diff] [blame] | 56 | } |