aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-xarch/powerpc/boot/wrapper14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index cb87a015be7c..df2358e9f1ca 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -138,14 +138,20 @@ objflags=-S
138tmp=$tmpdir/zImage.$$.o 138tmp=$tmpdir/zImage.$$.o
139ksection=.kernel:vmlinux.strip 139ksection=.kernel:vmlinux.strip
140isection=.kernel:initrd 140isection=.kernel:initrd
141link_address='0x400000'
141 142
142case "$platform" in 143case "$platform" in
143pmac|pseries|chrp) 144pseries)
145 platformo=$object/of.o
146 link_address='0x4000000'
147 ;;
148pmac|chrp)
144 platformo=$object/of.o 149 platformo=$object/of.o
145 ;; 150 ;;
146coff) 151coff)
147 platformo=$object/of.o 152 platformo=$object/of.o
148 lds=$object/zImage.coff.lds 153 lds=$object/zImage.coff.lds
154 link_address='0x500000'
149 ;; 155 ;;
150miboot|uboot) 156miboot|uboot)
151 # miboot and U-boot want just the bare bits, not an ELF binary 157 # miboot and U-boot want just the bare bits, not an ELF binary
@@ -190,6 +196,7 @@ ps3)
190 objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" 196 objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data"
191 ksection=.kernel:vmlinux.bin 197 ksection=.kernel:vmlinux.bin
192 isection=.kernel:initrd 198 isection=.kernel:initrd
199 link_address=''
193 ;; 200 ;;
194ep88xc|ep405|ep8248e) 201ep88xc|ep405|ep8248e)
195 platformo="$object/fixed-head.o $object/$platform.o" 202 platformo="$object/fixed-head.o $object/$platform.o"
@@ -272,7 +279,10 @@ if [ -n "$dtb" ]; then
272fi 279fi
273 280
274if [ "$platform" != "miboot" ]; then 281if [ "$platform" != "miboot" ]; then
275 ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \ 282 if [ -n "$link_address" ] ; then
283 text_start="-Ttext $link_address --defsym _start=$link_address"
284 fi
285 ${CROSS}ld -m elf32ppc -T $lds $text_start -o "$ofile" \
276 $platformo $tmp $object/wrapper.a 286 $platformo $tmp $object/wrapper.a
277 rm $tmp 287 rm $tmp
278fi 288fi