[Crash-utility] minor bug in get_text_init_space

Per Fransson per.xx.fransson at stericsson.com
Wed Sep 29 13:14:59 UTC 2010


Hi,

I believe the ARM support introduced a minor issue in the function
get_text_init_space(). As it stands, the error "cannot determine text
init space" can only occur when machine_type("ARM") is true. Here a
suggested fix.

Regards,
Per

--- a/symbols.c
+++ b/symbols.c
@@ -491,9 +491,9 @@ get_text_init_space(void)

        if (((section = get_kernel_section(".text.init")) == NULL) &&
            ((section = get_kernel_section(".init.text")) == NULL) &&
-           (machine_type("ARM") && (section =
get_kernel_section(".init")) == NULL)) {
-               error(WARNING, "cannot determine text init space\n");
-               return;
+           !(machine_type("ARM") && (section =
get_kernel_section(".init")) != NULL)) {
+           error(WARNING, "cannot determine text init space\n");
+           return;
        }

        kt->stext_init = (ulong)bfd_get_section_vma(st->bfd, section);




More information about the Crash-utility mailing list