summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetObjectFile.h
Commit message (Collapse)AuthorAge
* PPC64: Constant initializers with dynamic relocations go in .data.rel.ro.Bill Schmidt2013-05-13
| | | | | | | | | | | | | | | | | | | | | | This fixes warning messages observed in the oggenc application test in projects/test-suite. Special handling is needed for the 64-bit PowerPC SVR4 ABI when a constant is initialized with a pointer to a function in a shared library. Because a function address is implemented as the address of a function descriptor, the use of copy relocations can lead to problems with initialization. GNU ld therefore replaces copy relocations with dynamic relocations to be resolved by the dynamic linker. This means the constant cannot reside in the read-only data section, but instead belongs in .data.rel.ro, which is designed for constants containing dynamic relocations. The implementation creates a class PPC64LinuxTargetObjectFile inheriting from TargetLoweringObjectFileELF, which behaves like its parent except to place constants of this sort into .data.rel.ro. The test case is reduced from the oggenc application. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181723 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the default for Darwin platforms is to place the LSDA into the TEXTBill Wendling2010-03-15
| | | | | | | section, remove the target-specific code that performs this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98580 91177308-0d34-0410-b5e6-96231b3b80d8
* The same situation that effected ARM effects PPC with regards to placing theBill Wendling2010-03-12
LSDA into the TEXT section. We need to generate non-lazy pointers to it on Mach-O. However, the object the NLP points to may be local to the translation unit. If so, then the NLP needs to have the value of that object specified instead of "0", which the linker interprets as "external". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98325 91177308-0d34-0410-b5e6-96231b3b80d8