Ignore:
Timestamp:
Nov 1, 2016, 2:41:13 PM (4 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Update.

File:
1 edited

Legend:

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

    r2518 r2519  
    5252        const Elf64_Sym& sym = getSymbol(i);
    5353        const cxbyte symType = ELF64_ST_TYPE(sym.st_info);
    54         if (sym.st_shndx==textIndex &&
     54        if (sym.st_shndx==textIndex && ELF64_ST_BIND(sym.st_info)==STB_GLOBAL &&
    5555            (symType==STT_GNU_IFUNC || symType==STT_OBJECT))
    5656            regionsNum++;
     
    7474       
    7575        const cxbyte symType = ELF64_ST_TYPE(sym.st_info);
    76         const bool isKernel = (symType==STT_GNU_IFUNC);
    77         if (symType==STT_GNU_IFUNC || symType==STT_OBJECT)
     76        if (ELF64_ST_BIND(sym.st_info)==STB_GLOBAL &&
     77            (symType==STT_GNU_IFUNC || symType==STT_OBJECT))
     78        {
     79            const bool isKernel = (symType==STT_GNU_IFUNC);
    7880            symOffsets[j] = std::make_pair(value, j);
    79        
    80         if (isKernel && value+0x100 > codeOffset+codeSize)
    81             throw Exception("Kernel offset is too big!");
    82         regions[j++] = { getSymbolName(i), size, value, isKernel };
     81            if (isKernel && value+0x100 > codeOffset+codeSize)
     82                throw Exception("Kernel offset is too big!");
     83            regions[j++] = { getSymbolName(i), size, value, isKernel };
     84        }
    8385    }
    8486    std::sort(symOffsets.get(), symOffsets.get()+regionsNum,
Note: See TracChangeset for help on using the changeset viewer.