diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2012-03-19 23:13:51 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-20 20:16:13 -0400 |
commit | dfbc2d75c1bd47c3186fa91f1655ea2f3825b0ec (patch) | |
tree | fcf40239b8b08b1072d14e0ec8f336be30fa0ae2 | |
parent | a6626ffe09d379bad4d0e49885f9195946ac875d (diff) |
powerpc/ps3: Do not adjust the wrapper load address
Commit c55aef0e5bc6 "powerpc/boot: Change the load address for the wrapper
to fit the kernel" adjusted the laod address if the uncompressed kernel
was too large. Ps3 does not compress the kernel and uses a different
linker script, so do not adjust the load address in that case.
fixes this build error:
powerpc64-linux-ld: section .text loaded at [0000000000e00000,0000000000e0721b] overlaps section .kernel:dtb loaded at [0000000000e00000,0000000000e0066f]
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rwxr-xr-x | arch/powerpc/boot/wrapper | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index f090e6d2907e..6761c746048d 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -144,6 +144,7 @@ tmp=$tmpdir/zImage.$$.o | |||
144 | ksection=.kernel:vmlinux.strip | 144 | ksection=.kernel:vmlinux.strip |
145 | isection=.kernel:initrd | 145 | isection=.kernel:initrd |
146 | link_address='0x400000' | 146 | link_address='0x400000' |
147 | make_space=y | ||
147 | 148 | ||
148 | case "$platform" in | 149 | case "$platform" in |
149 | pseries) | 150 | pseries) |
@@ -210,6 +211,7 @@ ps3) | |||
210 | ksection=.kernel:vmlinux.bin | 211 | ksection=.kernel:vmlinux.bin |
211 | isection=.kernel:initrd | 212 | isection=.kernel:initrd |
212 | link_address='' | 213 | link_address='' |
214 | make_space=n | ||
213 | pie= | 215 | pie= |
214 | ;; | 216 | ;; |
215 | ep88xc|ep405|ep8248e) | 217 | ep88xc|ep405|ep8248e) |
@@ -278,17 +280,19 @@ else | |||
278 | rm -f $vmz.$$ | 280 | rm -f $vmz.$$ |
279 | fi | 281 | fi |
280 | 282 | ||
281 | # Round the size to next higher MB limit | 283 | if [ "$make_space" = "y" ]; then |
282 | round_size=$(((strip_size + 0xfffff) & 0xfff00000)) | 284 | # Round the size to next higher MB limit |
285 | round_size=$(((strip_size + 0xfffff) & 0xfff00000)) | ||
283 | 286 | ||
284 | round_size=0x$(printf "%x" $round_size) | 287 | round_size=0x$(printf "%x" $round_size) |
285 | link_addr=$(printf "%d" $link_address) | 288 | link_addr=$(printf "%d" $link_address) |
286 | 289 | ||
287 | if [ $link_addr -lt $strip_size ]; then | 290 | if [ $link_addr -lt $strip_size ]; then |
288 | echo "INFO: Uncompressed kernel (size 0x$(printf "%x\n" $strip_size))" \ | 291 | echo "INFO: Uncompressed kernel (size 0x$(printf "%x\n" $strip_size))" \ |
289 | "overlaps the address of the wrapper($link_address)" | 292 | "overlaps the address of the wrapper($link_address)" |
290 | echo "INFO: Fixing the link_address of wrapper to ($round_size)" | 293 | echo "INFO: Fixing the link_address of wrapper to ($round_size)" |
291 | link_address=$round_size | 294 | link_address=$round_size |
295 | fi | ||
292 | fi | 296 | fi |
293 | 297 | ||
294 | vmz="$vmz$gzip" | 298 | vmz="$vmz$gzip" |