Ignore:
Timestamp:
Nov 6, 2016, 9:51:58 PM (4 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Add empty constructors for ElfSymbolXX and ElfRegionXX.
ROCmBinGen: adding symbols to binary.

File:
1 edited

Legend:

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

    r2538 r2545  
    193193   
    194194    ElfBinaryGen64 elfBinGen64;
     195    // add symbols
     196    elfBinGen64.addDynSymbol(ElfSymbol64("_DYNAMIC", 5,
     197                  ELF64_ST_INFO(STB_LOCAL, STT_NOTYPE), STV_HIDDEN, true, 0, 0));
     198    for (const ROCmSymbolInput& symbol: input->symbols)
     199    {
     200        ElfSymbol64 elfsym;
     201        if (symbol.isKernel)
     202            elfsym = ElfSymbol64(symbol.symbolName.c_str(), 4,
     203                  ELF64_ST_INFO(STB_GLOBAL, STT_GNU_IFUNC), 0, true,
     204                  symbol.offset, symbol.size);
     205        else
     206            elfsym = ElfSymbol64(symbol.symbolName.c_str(), 4,
     207                  ELF64_ST_INFO(STB_GLOBAL, STT_NOTYPE), 0, true,
     208                  symbol.offset, symbol.size);
     209        elfBinGen64.addSymbol(elfsym);
     210        elfBinGen64.addDynSymbol(elfsym);
     211    }
     212   
    195213    elfBinGen64.addRegion(ElfRegion64::programHeaderTable());
    196214    elfBinGen64.addRegion(ElfRegion64::dynsymSection());
Note: See TracChangeset for help on using the changeset viewer.