@@ -32,7 +32,7 @@ static const uintptr_t ELF_START = reinterpret_cast<uintptr_t>(&_ELF_START_);
3232
3333#define frp (N, ra ) \
3434 (__builtin_frame_address(N) != nullptr ) && \
35- (ra = __builtin_return_address(N)) != nullptr
35+ (ra = __builtin_return_address(N)) != nullptr && ra != ( void *)- 1 \
3636
3737extern " C" char *
3838__cxa_demangle (const char *name, char *buf, size_t *n, int *status);
@@ -63,8 +63,8 @@ class ElfTables
6363public:
6464 ElfTables () {}
6565
66- void set (Elf32_Sym* syms,
67- uint32_t entries,
66+ void set (Elf32_Sym* syms,
67+ uint32_t entries,
6868 const char * string_table,
6969 uint32_t strsize,
7070 uint32_t csum_syms,
@@ -143,7 +143,7 @@ class ElfTables
143143 }
144144
145145 bool verify_symbols () const {
146- uint32_t csum =
146+ uint32_t csum =
147147 crc32 (symtab.base , symtab.entries * sizeof (Elf32_Sym));
148148 if (csum != checksum_syms) {
149149 printf (" ELF symbol tables checksum failed! "
@@ -391,7 +391,7 @@ void _init_elf_parser()
391391{
392392 if (relocs.entries ) {
393393 // apply changes to the symbol parser from custom location
394- parser.set (relocs.syms , relocs.entries ,
394+ parser.set (relocs.syms , relocs.entries ,
395395 relocs.strings (), relocs.strsize ,
396396 relocs.check_syms , relocs.check_strs );
397397 }
0 commit comments