[PowerPC] Only move linker sets to .data on ELFv1
In r268055, powerpc64 was special cased regarding linker sets to not mark the function pointer as 'const'. This appears to have been done to ensure the compiler generates the function descriptors correctly. When non-const, the function descriptors will end up in the .data.rel.local section, and the linker set symbols will get relocations pointing to them there. Since function pointers on ELFv2 are "just" pointers like other platforms, we can leave them const like they are on every other platform. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D22796
This commit is contained in:
parent
5d3bd9e242
commit
59efc3a839
@ -42,8 +42,11 @@
|
||||
* For ELF, this is done by constructing a separate segment for each set.
|
||||
*/
|
||||
|
||||
#if defined(__powerpc64__)
|
||||
#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)
|
||||
/*
|
||||
* ELFv1 pointers to functions are actaully pointers to function
|
||||
* descriptors.
|
||||
*
|
||||
* Move the symbol pointer from ".text" to ".data" segment, to make
|
||||
* the GCC compiler happy:
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user