diff options
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 472eda96d8a..f17d7051fe7 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -1456,8 +1456,11 @@ void SymbolTableSection<ELFT>::writeLocalSymbols(uint8_t *&Buf) { const OutputSectionBase<ELFT> *OutSec = Section->OutSec; ESym->st_shndx = OutSec->SectionIndex; VA = Section->getOffset(*Sym); - // Symbol offsets for AMDGPU need to be the offset in bytes of the - // symbol from the beginning of the section. + + // Symbol offsets for AMDGPU are the offsets in bytes of the + // symbols from the beginning of the section. There seems to be no + // reason for that deviation -- it's just that the definition of + // st_value field in AMDGPU's ELF is odd. if (Config->EMachine != EM_AMDGPU) VA += OutSec->getVA(); } |