[PATCH] Don't access items in .sdata section using gp-relative addressing when target is NaCl.

Sasa Stankovic Sasa.Stankovic at imgtec.com
Mon Jun 9 11:03:46 PDT 2014


Here is some explanation for it, but I'm not sure whether this should be in the commit message. This is also not supported in Linux, but I don't know the reason for it. But even if we enable gp-relative addressing in NaCl, it wouldn't work because MIPS Gold linker currently doesn't support it. For gp-relative addressing to work, linker needs to emit together all the sections that are accessed using gp-relative addressing (.got section first, followed by various small-data sections (.sdata, .sbss, ...)). This is currently not implemented in MIPS Gold. (In GNU ld, this section ordering is specified in ld's internal linker script, but Gold doesn't have internal linker script.)

http://reviews.llvm.org/D4069






More information about the llvm-commits mailing list