diff options
author | eutarass | 2008-09-06 01:17:15 +0000 |
---|---|---|
committer | eutarass | 2008-09-06 01:17:15 +0000 |
commit | f3c8d3454087f450915c41aced0da34f6376ec64 (patch) | |
tree | 19990f279db1b20d198e0bf83f5c314aaa9e8fc3 /dwarfio.c | |
parent | c72f24c7147b0653436d837296b9b62e2a642903 (diff) | |
download | org.eclipse.tcf.agent-f3c8d3454087f450915c41aced0da34f6376ec64.tar.gz org.eclipse.tcf.agent-f3c8d3454087f450915c41aced0da34f6376ec64.tar.xz org.eclipse.tcf.agent-f3c8d3454087f450915c41aced0da34f6376ec64.zip |
TCF Agent: Got rid of libelf dependency. Use mmap() to access ELF sections data.
Diffstat (limited to 'dwarfio.c')
-rw-r--r-- | dwarfio.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -117,11 +117,12 @@ static DIO_Cache * dio_GetCache(ELF_File * File) { } void dio_EnterSection(ELF_Section * Section, U8_T Offset) { + if (elf_load(Section)) exception(errno); sSection = Section; + sData = Section->data; sDataPos = Offset; sDataLen = Section->size; sBigEndian = Section->file->big_endian; - if (elf_load(Section, &sData)) exception(errno); dio_gVersion = 0; dio_g64bit = 0; dio_gAddressSize = 4; @@ -304,9 +305,10 @@ static U1_T * dio_LoadStringTable(U4_T * StringTableSize) { } Cache->mStringTableSize = (size_t)Section->size; - if (elf_load(Section, &Cache->mStringTable) < 0) { + if (elf_load(Section) < 0) { str_exception(ERR_INV_DWARF, "invalid .debug_str section"); } + Cache->mStringTable = Section->data; } *StringTableSize = Cache->mStringTableSize; |