diff options
| author | Roland McGrath <[email protected]> | 2008-04-11 07:01:58 +0000 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2008-04-11 07:01:58 +0000 |
| commit | 521c47d2a216fc64098c024fc5ed53532b485f32 (patch) | |
| tree | a0ac572e77cbdded1f90fb1996d95cbe3890c36b /src/elflint.c | |
| parent | 9c4242ef635e2017b1aab2975e4529791b24208f (diff) | |
src/
* strip.c (handle_elf): Don't keep sections that kept symbol tables
refer to. Instead, just be sure to preserve the original symbol
table in the debug file so those symbols go with their sections and
can be elided from the stripped version of the symbol table.
tests/
* testfile48.bz2, testfile48.bz2.debug: New data files.
* Makefile.am (EXTRA_DIST): Add them.
* run-strip-test8.sh: Use them.
Diffstat (limited to 'src/elflint.c')
| -rw-r--r-- | src/elflint.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/elflint.c b/src/elflint.c index b13dfdb5..bc4219b3 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -579,9 +579,12 @@ check_symtab (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Shdr *shdr, int idx) return; if (strshdr->sh_type != SHT_STRTAB) - ERROR (gettext ("section [%2d] '%s': referenced as string table for section [%2d] '%s' but type is not SHT_STRTAB\n"), - shdr->sh_link, section_name (ebl, shdr->sh_link), - idx, section_name (ebl, idx)); + { + ERROR (gettext ("section [%2d] '%s': referenced as string table for section [%2d] '%s' but type is not SHT_STRTAB\n"), + shdr->sh_link, section_name (ebl, shdr->sh_link), + idx, section_name (ebl, idx)); + strshdr = NULL; + } /* Search for an extended section index table section. */ Elf_Data *xndxdata = NULL; @@ -659,7 +662,9 @@ section [%2d] '%s': XINDEX for zeroth entry not zero\n"), } const char *name = NULL; - if (sym->st_name >= strshdr->sh_size) + if (strshdr == NULL) + name = ""; + else if (sym->st_name >= strshdr->sh_size) ERROR (gettext ("\ section [%2d] '%s': symbol %zu: invalid name value\n"), idx, section_name (ebl, idx), cnt); |
