VirtualBox

Ignore:
Timestamp:
May 25, 2013 7:51:19 PM (12 years ago)
Author:
vboxsync
Message:

IPRT: Changed RTLDRSEG::pchName to pszName and make sure it's always set to something. Started on implementing a codeview reader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h

    r46259 r46266  
    10951095     * Do the enumeration.
    10961096     */
     1097    char            szName[32];
    10971098    const Elf_Shdr *paShdrs    = pModElf->paShdrs;
    10981099    const Elf_Shdr *paOrgShdrs = pModElf->paOrgShdrs;
     
    11001101    {
    11011102        RTLDRSEG Seg;
    1102         Seg.pchName     = ELF_SH_STR(pModElf, paShdrs[iShdr].sh_name);
    1103         Seg.cchName     = (uint32_t)strlen(Seg.pchName);
     1103        Seg.pszName     = ELF_SH_STR(pModElf, paShdrs[iShdr].sh_name);
     1104        Seg.cchName     = (uint32_t)strlen(Seg.pszName);
     1105        if (Seg.cchName == 0)
     1106        {
     1107            Seg.pszName = szName;
     1108            Seg.cchName = (uint32_t)RTStrPrintf(szName, sizeof(szName), "UnamedSect%02u", iShdr);
     1109        }
    11041110        Seg.SelFlat     = 0;
    11051111        Seg.Sel16bit    = 0;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette