[PATCH] MIPS: Add comment to explain why PIC code gen is the default for MIPS

Sasa Stankovic Sasa.Stankovic at imgtec.com
Thu Sep 25 01:05:09 PDT 2014


LGTM. I would only add that not only GCC but Clang too has non-PIC as default.

Btw, one area that still requires PIC code is creating .so files. Creating .so files from non-PIC code requires that non-PIC relocations be converted into dynamic ones (that would be later resolved by dynamic linker, based on the memory address where .so file is loaded), and Mips linker (currently) cannot convert most of the non-PIC relocation types into dynamic ones. So .so files must be created with -fPIC on MIPS.

http://reviews.llvm.org/D5487






More information about the llvm-commits mailing list