Changeset 83349b03 in mainline


Ignore:
Timestamp:
2010-01-28T22:28:40Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
19f24fd
Parents:
f0bdfb7
Message:

Ignore symbols with type other than 'object' or 'function'.

Location:
uspace/app/taskdump
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskdump/include/elf.h

    rf0bdfb7 r83349b03  
    148148#define SHF_MASKPROC            0xf0000000
    149149
     150/** Macros for decomposing elf_symbol.st_info into binging and type */
     151#define ELF_ST_BIND(i)          ((i) >> 4)
     152#define ELF_ST_TYPE(i)          ((i) & 0x0f)
     153#define ELF_ST_INFO(b, t)       (((b) << 4) + ((t) & 0x0f))
     154
    150155/**
    151156 * Symbol binding
  • uspace/app/taskdump/symtab.c

    rf0bdfb7 r83349b03  
    206206        size_t i;
    207207        char *sname;
     208        unsigned stype;
    208209
    209210        for (i = 0; i < st->sym_size / sizeof(elf_symbol_t); ++i) {
    210211                if (st->sym[i].st_name == 0)
     212                        continue;
     213
     214                stype = ELF_ST_TYPE(st->sym[i].st_info);
     215                if (stype != STT_OBJECT && stype != STT_FUNC)
    211216                        continue;
    212217
     
    240245        uintptr_t saddr, best_addr;
    241246        char *sname, *best_name;
     247        unsigned stype;
    242248
    243249        best_name = NULL;
     
    246252        for (i = 0; i < st->sym_size / sizeof(elf_symbol_t); ++i) {
    247253                if (st->sym[i].st_name == 0)
     254                        continue;
     255
     256                stype = ELF_ST_TYPE(st->sym[i].st_info);
     257                if (stype != STT_OBJECT && stype != STT_FUNC)
    248258                        continue;
    249259
Note: See TracChangeset for help on using the changeset viewer.