This will allow us to remove the AMDGPU support from old ELF.
Details
Diff Detail
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 | Why is AMDGPU special for this if? | |
| ELF/OutputSections.cpp | ||
| 789–790 | Why is this needed? | |
| 1295 | Ditto | |
| ELF/Target.cpp | ||
| 1272 | { } -> {} (Please run clang-format for this patch.) | |
| ELF/Writer.cpp | ||
| 840 | unsigned -> uint32_t. This function needs a brief comment to describe why AMDGPU is special. | |
| ELF/OutputSections.cpp | ||
|---|---|---|
| 789 | 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 | If -e doesn't make sense for AMDGPU, should we treat it an error if a user specifies -e for AMDGPU? | |
| ELF/Writer.cpp | ||
| 904–905 | 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(); | |
Why is AMDGPU special for this if?