Changeset 2530 in CLRX


Ignore:
Timestamp:
Nov 4, 2016, 4:09:25 PM (3 years ago)
Author:
matszpk
Message:

CLRadeonExtender: next commenting the code. add data regions only for global symbols.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r2522 r2530  
    4949    const size_t symbolsNum = getSymbolsNum();
    5050    for (size_t i = 0; i < symbolsNum; i++)
    51     {
     51    {   // count regions number
    5252        const Elf64_Sym& sym = getSymbol(i);
    5353        const cxbyte symType = ELF64_ST_TYPE(sym.st_info);
     54        const cxbyte bind = ELF64_ST_BIND(sym.st_info);
    5455        if (sym.st_shndx==textIndex &&
    55             (symType==STT_GNU_IFUNC || symType==STT_OBJECT))
     56            (symType==STT_GNU_IFUNC || (bind==STB_GLOBAL && symType==STT_OBJECT)))
    5657            regionsNum++;
    5758    }
     
    6768        const Elf64_Sym& sym = getSymbol(i);
    6869        if (sym.st_shndx!=textIndex)
    69             continue;
     70            continue;   // if not in '.text' section
    7071        const size_t value = ULEV(sym.st_value);
    7172        if (value < codeOffset)
     
    7475       
    7576        const cxbyte symType = ELF64_ST_TYPE(sym.st_info);
    76         if (symType==STT_GNU_IFUNC || symType==STT_OBJECT)
     77        const cxbyte bind = ELF64_ST_BIND(sym.st_info);
     78        if (symType==STT_GNU_IFUNC || (bind==STB_GLOBAL && symType==STT_OBJECT))
    7779        {
    7880            const bool isKernel = (symType==STT_GNU_IFUNC);
Note: See TracChangeset for help on using the changeset viewer.