+2007-10-04 Ulrich Drepper <drepper@redhat.com>
+
+ * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake
+ initialization of notes variable.
+
2007-10-04 Roland McGrath <roland@redhat.com>
* linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES,
/* Try to figure out the bounds of the kernel image without
looking for any vmlinux file. */
Dwarf_Addr notes;
+ /* The compiler cannot deduce that if intuit_kernel_bounds returns
+ zero NOTES will be initialized. Fake the initialization. */
+ asm ("" : "=m" (notes));
int result = intuit_kernel_bounds (&start, &end, ¬es);
if (result == 0)
{
+2007-10-04 Ulrich Drepper <drepper@redhat.com>
+
+ * readelf.c (dump_archive_index): Avoid warning about uninitialized
+ variable with older glibc versions.
+ Add some branch prediction.
+
2007-10-04 Roland McGrath <roland@redhat.com>
* readelf.c (print_archive_index): New variable.
{
/* Get the section header string table index. */
size_t shstrndx;
- if (elf_getshstrndx (ebl->elf, &shstrndx) < 0)
+ if (unlikely (elf_getshstrndx (ebl->elf, &shstrndx) < 0))
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
if (arsym == NULL)
{
int result = elf_errno ();
- if (result != ELF_E_NO_INDEX)
+ if (unlikely (result != ELF_E_NO_INDEX))
error (EXIT_FAILURE, 0,
gettext ("cannot get symbol index of archive '%s': %s"),
fname, elf_errmsg (result));
as_off = s->as_off;
Elf *subelf;
- if (elf_rand (elf, as_off) == 0
- || (subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) == NULL)
- error (EXIT_FAILURE, 0,
- gettext ("cannot extract member at offset %Zu in '%s': %s"),
- as_off, fname, elf_errmsg (-1));
+ if (unlikely (elf_rand (elf, as_off) == 0)
+ || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
+ == NULL))
+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
+ while (1)
+#endif
+ error (EXIT_FAILURE, 0,
+ gettext ("cannot extract member at offset %Zu in '%s': %s"),
+ as_off, fname, elf_errmsg (-1));
const Elf_Arhdr *h = elf_getarhdr (subelf);