diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-05-17 10:40:09 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-05-17 10:40:09 +0200 |
commit | 6af1500b30bfdb343bbf1efe432f797cb2c03cdf (patch) | |
tree | e94535dac115d8f9e3550801528ab909a14c5ae0 /ddb | |
parent | b4d07d3c60449dde5c567aaeb2db0cd9f39547bd (diff) | |
download | gnumach-6af1500b30bfdb343bbf1efe432f797cb2c03cdf.tar.gz gnumach-6af1500b30bfdb343bbf1efe432f797cb2c03cdf.tar.bz2 gnumach-6af1500b30bfdb343bbf1efe432f797cb2c03cdf.zip |
Revert "Fix getting ELF symbol bind and type"
This reverts commit a8a52cafb5621b475737ffdc81f63703d5b37904.
It seems to be breaking backtracing in ddb...
Diffstat (limited to 'ddb')
-rw-r--r-- | ddb/db_elf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ddb/db_elf.c b/ddb/db_elf.c index f654ad7f..10e71621 100644 --- a/ddb/db_elf.c +++ b/ddb/db_elf.c @@ -165,23 +165,23 @@ elf_db_search_symbol (db_symtab_t *stab, if (s->st_name == 0) continue; - if (strategy == DB_STGY_XTRN && (ELF32_ST_BIND(s->st_info) != STB_GLOBAL)) + if (strategy == DB_STGY_XTRN && (s->st_info & STB_GLOBAL) == 0) continue; if (off >= s->st_value) { - if (ELF32_ST_TYPE(s->st_info) == STT_FUNC) + if (s->st_info == STT_FUNC) continue; if (off - s->st_value < diff) { diff = off - s->st_value; symp = s; - if (diff == 0 && (ELF32_ST_BIND(s->st_info) == STB_GLOBAL)) + if (diff == 0 && (s->st_info & STB_GLOBAL)) break; } else if (off - s->st_value == diff) { if (symp == NULL) symp = s; - else if ((ELF32_ST_BIND(symp->st_info) != STB_GLOBAL) - && (ELF32_ST_BIND(s->st_info) == STB_GLOBAL)) + else if ((symp->st_info & STB_GLOBAL) == 0 + && (s->st_info & STB_GLOBAL) != 0) symp = s; /* pick the external symbol */ } } |