@@ -374,6 +374,8 @@ do_dwarf_phdr(char *ptr, dw_info_t *dw)
374374 int found = 0 ;
375375 char * fp_start ;
376376 char * fp ;
377+ unsigned addr ;
378+ int fde_count ;
377379int do_phdr = 1 ;
378380
379381 /***********************************************/
@@ -445,9 +447,9 @@ printk("do_dwarf_phdr: %d ehdr=%p eh_frame_hdr_data=%p fp=%p\n", __LINE__, ehdr,
445447 printf ("EH.fde_fount_enc: %02x\n" , * fp ++ );
446448 printf ("EH.table_enc: %02x\n" , * fp ++ );
447449 printf ("EH.eh_frame_ptr: %02x\n" , * (uint32_t * ) fp ); fp += 4 ;
448- int fde_count = * (uint32_t * ) fp ; fp += 4 ;
450+ fde_count = * (uint32_t * ) fp ; fp += 4 ;
449451 printf ("EH.fde_count: %02x\n" , fde_count );
450- unsigned addr = 0 ;
452+ addr = 0 ;
451453 for (i = 0 ; i < fde_count ; i ++ ) {
452454 char * fp1 = fp + i * 2 * 4 ;
453455 unsigned addr1 = * (uint32_t * ) (fp1 + 4 );
@@ -524,7 +526,7 @@ dw_find_ret_addr(dw_info_t *dw, unsigned long pc, int *cfa_offsetp)
524526
525527 char * aug = NULL ;
526528
527- printk ("dw_find_ret_addr: here....1\npc=%p fp=%p end=%p size=%x\n" , pc , fp , eh_frame_end , dw -> eh_frame_sec -> sh_size );
529+ printk ("dw_find_ret_addr: here....1\npc=%p fp=%p end=%p size=%x\n" , ( void * ) pc , fp , eh_frame_end , ( int ) dw -> eh_frame_sec -> sh_size );
528530 /***********************************************/
529531 /* Walk the series of CIE/FDE entries til */
530532 /* we find one that matches the target */
@@ -613,8 +615,8 @@ printf("R encoding %x (kernel)\n", *a);
613615 }
614616
615617 printf ("\n%04x FDE len=%x cie=%04x pc=%lx..%lx tpc=%lx\n" ,
616- fp_start - dw -> eh_frame_data - 4 ,
617- len , cie ,
618+ ( int ) ( fp_start - dw -> eh_frame_data - 4 ) ,
619+ ( int ) len , ( int ) cie ,
618620 dw -> pc_begin , dw -> pc_begin + dw -> pc_end , pc );
619621//printf("fde_encoding=%d\n", fde_encoding);
620622 if (* aug == 'z' ) {
@@ -833,7 +835,7 @@ return 1;
833835 /* Nope - not here at all. */
834836 /***********************************************/
835837printf ("not found at all....\n" );
836- printk ("here....1 fp=%p end=%p size=%x\n" , fp , eh_frame_end , dw -> eh_frame_sec -> sh_size );
838+ printk ("here....1 fp=%p end=%p size=%x\n" , fp , eh_frame_end , ( int ) dw -> eh_frame_sec -> sh_size );
837839 return 0 ;
838840}
839841static char *
0 commit comments