summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2016-01-30 12:10:49 +0800
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2016-01-31 16:32:56 +0100
commit397d7d5a1be16208d82ad3997bd3068a6f529b6f (patch)
tree972d6b5d4251ffa3cf8a235e53d57c341828b790 /include
parentc5e954eccd473c1601d60d144bc18f90893cb3ac (diff)
downloadtalos-obmc-uboot-397d7d5a1be16208d82ad3997bd3068a6f529b6f.tar.gz
talos-obmc-uboot-397d7d5a1be16208d82ad3997bd3068a6f529b6f.zip
arm: config: enforce -fno-pic for gcc
Android's tool chain enable the -mandroid at default. This option will enable the -fpic, which cause uboot compilation failure: " LD u-boot u-boot contains unexpected relocations: R_ARM_ABS32 R_ARM_RELATIVE " In my testcase, arm-linux-androideabi-gcc-4.9 internally enables '-fpic', so when compiling code, there will be relocation entries using type R_ARM_GOT_BREL and .got section. When linking all the built-in.o using ld, there will be R_ARM_ABS32 relocation entry and .got section in the final u-boot elf image. This can not be handled by u-boot, since u-boot only expects R_ARM_RELATIVE relocation entry. arm-poky-linux-gnueabi-gcc-4.9 default does not enable '-fpic', so there is not .got section and R_ARM_GOT_BREL in built-in.o. And in the final u-boot elf image, all relocation entries are R_ARM_RELATIVE. we can pass '-fno-pic' to xxx-gcc to disable pic. whether the toolchain internally enables or disables pic, '-fno-pic' can work well. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud