Changeset 2536 in CLRX


Ignore:
Timestamp:
Nov 4, 2016, 10:18:28 PM (3 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Add Elf_Dyn to Elf.h. Some updates in ROCmBinaries.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdbin/Elf.h

    r1988 r2536  
    601601#define NT_GNU_GOLD_VERSION 4
    602602
     603/* Dynamic section entry.  */
     604
     605typedef struct
     606{
     607  Elf32_Sword   d_tag;          /* Dynamic entry type */
     608  union
     609    {
     610      Elf32_Word d_val;         /* Integer value */
     611      Elf32_Addr d_ptr;         /* Address value */
     612    } d_un;
     613} Elf32_Dyn;
     614
     615typedef struct
     616{
     617  Elf64_Sxword  d_tag;          /* Dynamic entry type */
     618  union
     619    {
     620      Elf64_Xword d_val;        /* Integer value */
     621      Elf64_Addr d_ptr;         /* Address value */
     622    } d_un;
     623} Elf64_Dyn;
     624
    603625/* NOTE: Further definitions has been deleted from this file, because was obsolete */
    604626
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r2535 r2536  
    1919
    2020#include <CLRX/Config.h>
     21#include <cassert>
    2122#include <cstdint>
    2223#include <algorithm>
     
    181182             Array<cxbyte>* aPtr) const
    182183{
    183     ElfBinaryGen64 elfBinGen64;
    184    
    185184    const char* comment = "CLRX ROCmBinGenerator " CLRX_VERSION;
    186185    uint32_t commentSize = ::strlen(comment);
     
    193192    }
    194193   
     194    ElfBinaryGen64 elfBinGen64;
    195195    elfBinGen64.addRegion(ElfRegion64::programHeaderTable());
    196196    elfBinGen64.addRegion(ElfRegion64::dynsymSection());
     
    210210    elfBinGen64.addRegion(ElfRegion64::sectionHeaderTable());
    211211   
    212     size_t binarySize;
     212    size_t binarySize = elfBinGen64.countSize();
    213213    /****
    214214     * prepare for write binary to output
     
    239239     * write binary to output
    240240     ****/
    241     //elfBinGen64->generate(bos);
    242     //assert(bos.getWritten() == binarySize);
     241    FastOutputBuffer bos(256, *os);
     242    elfBinGen64.generate(bos);
     243    assert(bos.getWritten() == binarySize);
    243244    }
    244245    catch(...)
Note: See TracChangeset for help on using the changeset viewer.