Details
- Reviewers
• tstellarAMD
Diff Detail
Event Timeline
lib/Target/AMDGPU/SIISelLowering.cpp | ||
---|---|---|
1524–1525 | What we do currently is to emit read-only data to the .text section, and then have the compiler use fixups to resolve the offsets. So, we don't really need to be emitting relocations or these type of symbols at all. However, it's really not correct to emit read-only data to the .text section, so I think we should fix this. We need to update the callback in AMDGPUTargetObjectFile.cpp to emit constant to the correct section (but only for isAmdHsaOS()), and then here we shouldn't be special casing linkonce/linkonce_odr we should be emitting GOTs for all constant address space variables that are not DSOLocal. |
This workaround is not needed any more
lib/Target/AMDGPU/SIISelLowering.cpp | ||
---|---|---|
1524–1525 | I agree, this was a temp workaround. I will send a separate patch for emitting read-only data to the right section |
What we do currently is to emit read-only data to the .text section, and then have the compiler use fixups to resolve the offsets. So, we don't really need to be emitting relocations or these type of symbols at all.
However, it's really not correct to emit read-only data to the .text section, so I think we should fix this. We need to update the callback in AMDGPUTargetObjectFile.cpp to emit constant to the correct section (but only for isAmdHsaOS()), and then here we shouldn't be special casing linkonce/linkonce_odr we should be emitting GOTs for all constant address space variables that are not DSOLocal.