diff options
| -rw-r--r-- | meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch | 190 | ||||
| -rw-r--r-- | meta/recipes-bsp/u-boot/u-boot_2015.01.bb | 2 |
2 files changed, 192 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch b/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch new file mode 100644 index 0000000000..faf2985140 --- /dev/null +++ b/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch | |||
| @@ -0,0 +1,190 @@ | |||
| 1 | From 9ba002f1b1afc7af84a352f4ecab32a30d7ba353 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
| 3 | Date: Mon, 9 Feb 2015 18:33:56 +0800 | ||
| 4 | Subject: [PATCH] powerpc/cpu/*/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ | ||
| 5 | definition | ||
| 6 | |||
| 7 | In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in | ||
| 8 | u-boot.lds overrides the linker built-in symbols | ||
| 9 | (https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=b893397a4b1316610f49819344817715e4305de9), | ||
| 10 | so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section. | ||
| 11 | |||
| 12 | To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol | ||
| 13 | should not be defined in sections, and the symbols in linker generated .got | ||
| 14 | section should be used(https://sourceware.org/ml/binutils/2008-09/msg00122.html). | ||
| 15 | |||
| 16 | Fixed the following build errors with binutils-2.25: | ||
| 17 | | powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got | ||
| 18 | |||
| 19 | Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
| 20 | |||
| 21 | Upstream-Status: Pending | ||
| 22 | |||
| 23 | Index: git/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | ||
| 24 | =================================================================== | ||
| 25 | --- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | ||
| 26 | +++ git/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | ||
| 27 | @@ -44,7 +44,6 @@ SECTIONS | ||
| 28 | _GOT2_TABLE_ = .; | ||
| 29 | KEEP(*(.got2)) | ||
| 30 | KEEP(*(.got)) | ||
| 31 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 32 | _FIXUP_TABLE_ = .; | ||
| 33 | KEEP(*(.fixup)) | ||
| 34 | } | ||
| 35 | Index: git/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | ||
| 36 | =================================================================== | ||
| 37 | --- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | ||
| 38 | +++ git/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | ||
| 39 | @@ -22,7 +22,6 @@ SECTIONS | ||
| 40 | _GOT2_TABLE_ = .; | ||
| 41 | KEEP(*(.got2)) | ||
| 42 | KEEP(*(.got)) | ||
| 43 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 44 | _FIXUP_TABLE_ = .; | ||
| 45 | KEEP(*(.fixup)) | ||
| 46 | } | ||
| 47 | Index: git/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | ||
| 48 | =================================================================== | ||
| 49 | --- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | ||
| 50 | +++ git/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | ||
| 51 | @@ -29,7 +29,6 @@ SECTIONS | ||
| 52 | _GOT2_TABLE_ = .; | ||
| 53 | KEEP(*(.got2)) | ||
| 54 | KEEP(*(.got)) | ||
| 55 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 56 | _FIXUP_TABLE_ = .; | ||
| 57 | KEEP(*(.fixup)) | ||
| 58 | } | ||
| 59 | Index: git/arch/powerpc/cpu/mpc85xx/u-boot.lds | ||
| 60 | =================================================================== | ||
| 61 | --- git.orig/arch/powerpc/cpu/mpc85xx/u-boot.lds | ||
| 62 | +++ git/arch/powerpc/cpu/mpc85xx/u-boot.lds | ||
| 63 | @@ -50,7 +50,6 @@ SECTIONS | ||
| 64 | _GOT2_TABLE_ = .; | ||
| 65 | KEEP(*(.got2)) | ||
| 66 | KEEP(*(.got)) | ||
| 67 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 68 | _FIXUP_TABLE_ = .; | ||
| 69 | KEEP(*(.fixup)) | ||
| 70 | } | ||
| 71 | Index: git/arch/powerpc/cpu/mpc8260/u-boot.lds | ||
| 72 | =================================================================== | ||
| 73 | --- git.orig/arch/powerpc/cpu/mpc8260/u-boot.lds | ||
| 74 | +++ git/arch/powerpc/cpu/mpc8260/u-boot.lds | ||
| 75 | @@ -27,7 +27,6 @@ SECTIONS | ||
| 76 | _GOT2_TABLE_ = .; | ||
| 77 | KEEP(*(.got2)) | ||
| 78 | KEEP(*(.got)) | ||
| 79 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 80 | _FIXUP_TABLE_ = .; | ||
| 81 | KEEP(*(.fixup)) | ||
| 82 | } | ||
| 83 | Index: git/arch/powerpc/cpu/74xx_7xx/u-boot.lds | ||
| 84 | =================================================================== | ||
| 85 | --- git.orig/arch/powerpc/cpu/74xx_7xx/u-boot.lds | ||
| 86 | +++ git/arch/powerpc/cpu/74xx_7xx/u-boot.lds | ||
| 87 | @@ -30,7 +30,6 @@ SECTIONS | ||
| 88 | _GOT2_TABLE_ = .; | ||
| 89 | KEEP(*(.got2)) | ||
| 90 | KEEP(*(.got)) | ||
| 91 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 92 | _FIXUP_TABLE_ = .; | ||
| 93 | KEEP(*(.fixup)) | ||
| 94 | } | ||
| 95 | Index: git/arch/powerpc/cpu/mpc512x/u-boot.lds | ||
| 96 | =================================================================== | ||
| 97 | --- git.orig/arch/powerpc/cpu/mpc512x/u-boot.lds | ||
| 98 | +++ git/arch/powerpc/cpu/mpc512x/u-boot.lds | ||
| 99 | @@ -24,7 +24,6 @@ SECTIONS | ||
| 100 | _GOT2_TABLE_ = .; | ||
| 101 | KEEP(*(.got2)) | ||
| 102 | KEEP(*(.got)) | ||
| 103 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 104 | _FIXUP_TABLE_ = .; | ||
| 105 | KEEP(*(.fixup)) | ||
| 106 | *(.fixup) | ||
| 107 | Index: git/arch/powerpc/cpu/mpc5xx/u-boot.lds | ||
| 108 | =================================================================== | ||
| 109 | --- git.orig/arch/powerpc/cpu/mpc5xx/u-boot.lds | ||
| 110 | +++ git/arch/powerpc/cpu/mpc5xx/u-boot.lds | ||
| 111 | @@ -33,7 +33,6 @@ SECTIONS | ||
| 112 | _GOT2_TABLE_ = .; | ||
| 113 | KEEP(*(.got2)) | ||
| 114 | KEEP(*(.got)) | ||
| 115 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 116 | _FIXUP_TABLE_ = .; | ||
| 117 | KEEP(*(.fixup)) | ||
| 118 | } | ||
| 119 | Index: git/arch/powerpc/cpu/mpc5xxx/u-boot.lds | ||
| 120 | =================================================================== | ||
| 121 | --- git.orig/arch/powerpc/cpu/mpc5xxx/u-boot.lds | ||
| 122 | +++ git/arch/powerpc/cpu/mpc5xxx/u-boot.lds | ||
| 123 | @@ -28,7 +28,6 @@ SECTIONS | ||
| 124 | _GOT2_TABLE_ = .; | ||
| 125 | KEEP(*(.got2)) | ||
| 126 | KEEP(*(.got)) | ||
| 127 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 128 | _FIXUP_TABLE_ = .; | ||
| 129 | KEEP(*(.fixup)) | ||
| 130 | } | ||
| 131 | Index: git/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds | ||
| 132 | =================================================================== | ||
| 133 | --- git.orig/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds | ||
| 134 | +++ git/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds | ||
| 135 | @@ -24,7 +24,6 @@ SECTIONS | ||
| 136 | _GOT2_TABLE_ = .; | ||
| 137 | KEEP(*(.got2)) | ||
| 138 | KEEP(*(.got)) | ||
| 139 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 140 | } | ||
| 141 | __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; | ||
| 142 | |||
| 143 | Index: git/arch/powerpc/cpu/mpc83xx/u-boot.lds | ||
| 144 | =================================================================== | ||
| 145 | --- git.orig/arch/powerpc/cpu/mpc83xx/u-boot.lds | ||
| 146 | +++ git/arch/powerpc/cpu/mpc83xx/u-boot.lds | ||
| 147 | @@ -26,7 +26,6 @@ SECTIONS | ||
| 148 | _GOT2_TABLE_ = .; | ||
| 149 | KEEP(*(.got2)) | ||
| 150 | KEEP(*(.got)) | ||
| 151 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 152 | _FIXUP_TABLE_ = .; | ||
| 153 | KEEP(*(.fixup)) | ||
| 154 | } | ||
| 155 | Index: git/arch/powerpc/cpu/mpc86xx/u-boot.lds | ||
| 156 | =================================================================== | ||
| 157 | --- git.orig/arch/powerpc/cpu/mpc86xx/u-boot.lds | ||
| 158 | +++ git/arch/powerpc/cpu/mpc86xx/u-boot.lds | ||
| 159 | @@ -32,7 +32,6 @@ SECTIONS | ||
| 160 | _GOT2_TABLE_ = .; | ||
| 161 | KEEP(*(.got2)) | ||
| 162 | KEEP(*(.got)) | ||
| 163 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 164 | _FIXUP_TABLE_ = .; | ||
| 165 | KEEP(*(.fixup)) | ||
| 166 | } | ||
| 167 | Index: git/arch/powerpc/cpu/mpc8xx/u-boot.lds | ||
| 168 | =================================================================== | ||
| 169 | --- git.orig/arch/powerpc/cpu/mpc8xx/u-boot.lds | ||
| 170 | +++ git/arch/powerpc/cpu/mpc8xx/u-boot.lds | ||
| 171 | @@ -34,7 +34,6 @@ SECTIONS | ||
| 172 | _GOT2_TABLE_ = .; | ||
| 173 | KEEP(*(.got2)) | ||
| 174 | KEEP(*(.got)) | ||
| 175 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 176 | _FIXUP_TABLE_ = .; | ||
| 177 | KEEP(*(.fixup)) | ||
| 178 | } | ||
| 179 | Index: git/arch/powerpc/cpu/ppc4xx/u-boot.lds | ||
| 180 | =================================================================== | ||
| 181 | --- git.orig/arch/powerpc/cpu/ppc4xx/u-boot.lds | ||
| 182 | +++ git/arch/powerpc/cpu/ppc4xx/u-boot.lds | ||
| 183 | @@ -46,7 +46,6 @@ SECTIONS | ||
| 184 | _GOT2_TABLE_ = .; | ||
| 185 | KEEP(*(.got2)) | ||
| 186 | KEEP(*(.got)) | ||
| 187 | - PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); | ||
| 188 | _FIXUP_TABLE_ = .; | ||
| 189 | KEEP(*(.fixup)) | ||
| 190 | } | ||
diff --git a/meta/recipes-bsp/u-boot/u-boot_2015.01.bb b/meta/recipes-bsp/u-boot/u-boot_2015.01.bb index 6feac3107d..70a1e545a0 100644 --- a/meta/recipes-bsp/u-boot/u-boot_2015.01.bb +++ b/meta/recipes-bsp/u-boot/u-boot_2015.01.bb | |||
| @@ -2,6 +2,8 @@ require u-boot.inc | |||
| 2 | 2 | ||
| 3 | DEPENDS += "dtc-native" | 3 | DEPENDS += "dtc-native" |
| 4 | 4 | ||
| 5 | SRC_URI += "file://0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch" | ||
| 6 | |||
| 5 | # This revision corresponds to the tag "v2015.01" | 7 | # This revision corresponds to the tag "v2015.01" |
| 6 | # We use the revision in order to avoid having to fetch it from the repo during parse | 8 | # We use the revision in order to avoid having to fetch it from the repo during parse |
| 7 | SRCREV = "92fa7f53f1f3f03296f8ffb14bdf1baefab83368" | 9 | SRCREV = "92fa7f53f1f3f03296f8ffb14bdf1baefab83368" |
