Changeset 4981 in CLRX


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

CLRadeonExtender: ROCmGen: Ordering binary sections (LLVM10BinFormat). Some changes.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmROCmFormat.cpp

    r4977 r4981  
    23982398    {
    23992399        AsmSection& asmDSection = assembler.sections[dataSection];
    2400         kdescBaseOffset = ((asmDSection.content.size() + 4095)&0xfff);
     2400        kdescBaseOffset = ((asmDSection.content.size() + 4095)&~0xfff);
    24012401    }
    24022402    // prepare kernels configuration
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r4980 r4981  
    587587    if (input->newBinFormat)
    588588        addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ROCMSECTID_NOTE);
    589     if (input->globalData != nullptr)
    590         addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ELFSECTID_RODATA);
     589    if (!input->llvm10BinFormat)
     590        if (input->globalData != nullptr)
     591            addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ELFSECTID_RODATA);
    591592    addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ELFSECTID_DYNSYM);
    592593    addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ROCMSECTID_HASH);
    593594    addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ELFSECTID_DYNSTR);
     595    if (input->llvm10BinFormat)
     596        if (input->globalData != nullptr)
     597            addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ELFSECTID_RODATA);
    594598    if (!input->gotSymbols.empty())
    595599        addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ROCMSECTID_RELADYN);
     
    726730    if (input->newBinFormat)
    727731        elfBinGen64->addRegion(ElfRegion64::noteSection());
    728     if (input->globalData != nullptr)
    729         elfBinGen64->addRegion(ElfRegion64(input->globalDataSize, input->globalData, 4,
    730                 ".rodata", SHT_PROGBITS, SHF_ALLOC, 0, 0, Elf64Types::nobase));
     732    if (!input->llvm10BinFormat)
     733        if (input->globalData != nullptr)
     734            elfBinGen64->addRegion(ElfRegion64(input->globalDataSize, input->globalData, 4,
     735                    ".rodata", SHT_PROGBITS, SHF_ALLOC, 0, 0, Elf64Types::nobase));
    731736   
    732737    elfBinGen64->addRegion(ElfRegion64(0, (const cxbyte*)nullptr, 8,
     
    738743    elfBinGen64->addRegion(ElfRegion64(0, (const cxbyte*)nullptr, 1, ".dynstr", SHT_STRTAB,
    739744                SHF_ALLOC, 0, 0, Elf64Types::nobase));
     745    if (input->llvm10BinFormat)
     746        if (input->globalData != nullptr)
     747            elfBinGen64->addRegion(ElfRegion64(input->globalDataSize, input->globalData, 64,
     748                    ".rodata", SHT_PROGBITS, SHF_ALLOC, 0, 0, Elf64Types::nobase));
    740749    if (!input->gotSymbols.empty())
    741750    {
Note: See TracChangeset for help on using the changeset viewer.