This will allow us to remove the AMDGPU support from old ELF.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This patch itself seems simple, but I don't know the reason of each change. A description for each change would be greatly appreciated.
ELF/Driver.cpp | ||
---|---|---|
246 ↗ | (On Diff #44025) | Why is AMDGPU special for this if? |
ELF/OutputSections.cpp | ||
789–790 ↗ | (On Diff #44025) | Why is this needed? |
1295 ↗ | (On Diff #44025) | Ditto |
ELF/Target.cpp | ||
1272 ↗ | (On Diff #44025) | { } -> {} (Please run clang-format for this patch.) |
ELF/Writer.cpp | ||
840 ↗ | (On Diff #44025) | unsigned -> uint32_t. This function needs a brief comment to describe why AMDGPU is special. |
ELF/Driver.cpp | ||
---|---|---|
250 ↗ | (On Diff #44036) | Then the check should be added here, no? |
ELF/OutputSections.cpp | ||
789 ↗ | (On Diff #44036) | It still looks odd since the value does not include section's address, but I guess there's a reason for that. Is there a spec or something for this? Please add a link if the document is available. |
ELF/OutputSections.cpp | ||
---|---|---|
789 ↗ | (On Diff #44036) | I have clarified this comment in the latest revision, but offsets stored in a symbol's st_value field for AMDGPU need to be byte offsets from the start of the section. So the section address needs to be ignored when computing the offset. There is a document specifying this object format. I have been working with people internally to get it released, I will add it to the documents once it is available. |
ELF/Driver.cpp | ||
---|---|---|
251 ↗ | (On Diff #44047) | If -e doesn't make sense for AMDGPU, should we treat it an error if a user specifies -e for AMDGPU? |
ELF/Writer.cpp | ||
906 ↗ | (On Diff #44047) | I think this is slightly better since readers don't have to read the subroutine unless they are interested in AMDGPU. uint32_t PTType = (Config->Emachine != EM_AMDGPU) ? PT_LOAD : getAmdgpuPhdr(); |