Fix error message strings so that they can be translated properly.

* readelf.c (CHECK_ENTSIZE_VALUES): Rewrite error message so that
	there is a single string for translation.
	(dynamic_section_mips_val): Likewise.
This commit is contained in:
Nick Clifton 2014-10-30 09:53:56 +00:00
parent 6427bef6d1
commit 76ca31c09f
2 changed files with 26 additions and 12 deletions

View File

@ -1,3 +1,9 @@
2014-10-30 Nick Clifton <nickc@redhat.com>
* readelf.c (CHECK_ENTSIZE_VALUES): Rewrite error message so that
there is a single string for translation.
(dynamic_section_mips_val): Likewise.
2014-10-29 Nick Clifton <nickc@redhat.com> 2014-10-29 Nick Clifton <nickc@redhat.com>
* po/bg.po: Updated Bulgarian translation. * po/bg.po: Updated Bulgarian translation.

View File

@ -5054,19 +5054,22 @@ process_section_headers (FILE * file)
break; break;
} }
#define CHECK_ENTSIZE_VALUES(section, i, size32, size64) \ #define CHECK_ENTSIZE_VALUES(section, i, size32, size64) \
do \ do \
{ \ { \
bfd_size_type expected_entsize = is_32bit_elf ? size32 : size64; \ bfd_size_type expected_entsize = is_32bit_elf ? size32 : size64; \
if (section->sh_entsize != expected_entsize) \ if (section->sh_entsize != expected_entsize) \
{ \ { \
error (_("Section %d has invalid sh_entsize of %" BFD_VMA_FMT "x\n"), \ char buf[40]; \
i, section->sh_entsize); \ sprintf_vma (buf, section->sh_entsize); \
error (_("(Using the expected size of %d for the rest of this dump)\n"), \ /* Note: coded this way so that there is a single string for \
(int) expected_entsize); \ translation. */ \
error (_("Section %d has invalid sh_entsize of %s\n"), i, buf); \
error (_("(Using the expected size of %u for the rest of this dump)\n"), \
(unsigned) expected_entsize); \
section->sh_entsize = expected_entsize; \ section->sh_entsize = expected_entsize; \
} \ } \
} \ } \
while (0) while (0)
#define CHECK_ENTSIZE(section, i, type) \ #define CHECK_ENTSIZE(section, i, type) \
@ -7776,7 +7779,12 @@ dynamic_section_mips_val (Elf_Internal_Dyn * entry)
if (VALID_DYNAMIC_NAME (entry->d_un.d_val)) if (VALID_DYNAMIC_NAME (entry->d_un.d_val))
printf (_("Interface Version: %s"), GET_DYNAMIC_NAME (entry->d_un.d_val)); printf (_("Interface Version: %s"), GET_DYNAMIC_NAME (entry->d_un.d_val));
else else
printf (_("<corrupt: %" BFD_VMA_FMT "d>"), entry->d_un.d_ptr); {
char buf[40];
sprintf_vma (buf, entry->d_un.d_ptr);
/* Note: coded this way so that there is a single string for translation. */
printf (_("<corrupt: %s>"), buf);
}
break; break;
case DT_MIPS_TIME_STAMP: case DT_MIPS_TIME_STAMP: