Changeset 4979 in CLRX


Ignore:
Timestamp:
Sep 19, 2019, 4:05:58 PM (4 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: ROCmGen: Add a missing kernel descriptor symbols.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdbin/ROCmBinaries.h

    r4961 r4979  
    478478    void* rocmGotGen;
    479479    void* rocmRelaDynGen;
     480    Array<CString> kdescSymNames;
    480481   
    481482    void generateInternal(std::ostream* osPtr, std::vector<char>* vPtr,
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r4978 r4979  
    801801    const cxuint kernelSymVis = input->llvm10BinFormat ? STV_PROTECTED : STV_DEFAULT;
    802802    size_t kdOffset = 0;
     803    size_t kdescIndex = 0;
     804    if (input->llvm10BinFormat)
     805        kdescSymNames.resize(input->symbols.size());
    803806    for (const ROCmSymbolInput& symbol: input->symbols)
    804807    {
     
    832835            std::string kdsym(symbol.symbolName.c_str());
    833836            kdsym += ".kd";
    834             elfsym = ElfSymbol64(kdsym.c_str(), rodataSectIndex,
    835                       ELF64_ST_INFO(STB_GLOBAL, kernelSymType),
     837            kdescSymNames[kdescIndex] = kdsym;
     838            elfsym = ElfSymbol64(kdescSymNames[kdescIndex].c_str(), rodataSectIndex,
     839                      ELF64_ST_INFO(STB_GLOBAL, STT_OBJECT),
    836840                      ELF64_ST_VISIBILITY(kernelSymVis), true, kdOffset, symbol.size);
    837841            kdOffset += sizeof(ROCmKernelDescriptor);
     842            elfBinGen64->addSymbol(elfsym);
     843            elfBinGen64->addDynSymbol(elfsym);
     844            kdescIndex++;
    838845        }
    839846    }
Note: See TracChangeset for help on using the changeset viewer.