diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/elflint.c | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 51b3dd80..69f9a655 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-07-14 Ulrich Drepper <[email protected]> + + * elflint.c (check_elf_header): Allow Linux ABI. + (check_symtab): Handle STB_GNU_UNIQUE. + 2009-07-08 Mark Wielaard <[email protected]> * readelf.c (attr_callback): Handle DW_Form constants for diff --git a/src/elflint.c b/src/elflint.c index c04ae57f..9915a549 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -377,8 +377,9 @@ check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size) ERROR (gettext ("unknown ELF header version number e_ident[%d] == %d\n"), EI_VERSION, ehdr->e_ident[EI_VERSION]); - /* We currently don't handle any OS ABIs. */ - if (ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE) + /* We currently don't handle any OS ABIs other than Linux. */ + if (ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE + && ehdr->e_ident[EI_OSABI] != ELFOSABI_LINUX) ERROR (gettext ("unsupported OS ABI e_ident[%d] == '%s'\n"), EI_OSABI, ebl_osabi_name (ebl, ehdr->e_ident[EI_OSABI], buf, sizeof (buf))); @@ -705,10 +706,17 @@ section [%2d] '%s': symbol %zu: invalid section index\n"), ERROR (gettext ("section [%2d] '%s': symbol %zu: unknown type\n"), idx, section_name (ebl, idx), cnt); - if (GELF_ST_BIND (sym->st_info) >= STB_NUM) + if (GELF_ST_BIND (sym->st_info) >= STB_NUM + && !ebl_symbol_binding_name (ebl, GELF_ST_BIND (sym->st_info), NULL, + 0)) ERROR (gettext ("\ section [%2d] '%s': symbol %zu: unknown symbol binding\n"), idx, section_name (ebl, idx), cnt); + if (GELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE + && GELF_ST_TYPE (sym->st_info) != STT_OBJECT) + ERROR (gettext ("\ +section [%2d] '%s': symbol %zu: unique symbol not of object type\n"), + idx, section_name (ebl, idx), cnt); if (xndx == SHN_COMMON) { |
