Changeset 3824 in CLRX


Ignore:
Timestamp:
Feb 19, 2018, 3:43:39 PM (16 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmROCm: Check symbols count after section differences resolvings.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdasm/AsmFormats.h

    r3795 r3824  
    536536    cxuint extraSectionCount;
    537537   
     538    size_t prevSymbolsCount;
     539   
    538540    bool unresolvedGlobals;
    539541    bool good;
  • CLRadeonExtender/trunk/amdasm/AsmROCmFormat.cpp

    r3809 r3824  
    120120             metadataSection(ASMSECT_NONE), dataSection(ASMSECT_NONE),
    121121             gotSection(ASMSECT_NONE), extraSectionCount(0),
    122              unresolvedGlobals(false), good(true)
     122             prevSymbolsCount(0), unresolvedGlobals(false), good(true)
    123123{
    124124    sectionDiffsResolvable = true;
     
    26432643    addSymbols(false);
    26442644    output.gotSymbols.resize(gotSymbols.size());
     2645    prevSymbolsCount = output.symbols.size() + output.extraSymbols.size();
    26452646   
    26462647    if (good)
     
    27482749        // if we have unresolved globals
    27492750        addSymbols(true);
     2751        if (prevSymbolsCount != output.symbols.size() + output.extraSymbols.size())
     2752        {
     2753            assembler.printError(nullptr, "Symbols count before section differences"
     2754                " resolving doesn't match with current symbols count!");
     2755            good = false;
     2756            return false;
     2757        }
    27502758        binGen->updateSymbols();
    27512759    }
Note: See TracChangeset for help on using the changeset viewer.