gcc - How to generate location independent code using GNU ARM toolchain? -
i using arm elf toolchain project. working on bootloader needs location independent relocate self flash ram upon reset. have tried hard figure out how compile location independent code using gnu arm toolchain can not seem make work.
i have tried using -fpic , -fpie options compiler , -pie linker when use these options compiler complains no section defined either .got or .plt sections. not sure these sections should go i.e in bss or text. after googling this, think should use -fpie not sure.
can experience please me. using gnu arm 4.1.1
you can generate position independent code [pic] supplying -mapcs-reentrant option arm-linux-gnueabi-gcc , -wa,-k option fellow assembler. like:
arm-linux-gnueabi-gcc <other option> -mapcs-reentrant -wa, -k <other option> files..
Comments
Post a Comment