@@ -352,7 +352,7 @@ pub fn print_load_commands(load_commands: &(Vec<LoadCommand>, Vec<Vec<Section>>,
352352
353353fn print_segment_command32 ( command : & SegmentCommand32 , table : & mut Table ) {
354354 print_lc_cmd_and_cmdsize ( command. cmd , command. cmdsize , table) ;
355- print_segname_bytes_array ( & command. segname , table) ;
355+ print_segname_or_sectname_bytes_array ( & command. segname , table) ;
356356 table. add_row ( row ! [ Fcc ->"vmaddr" , Fyc ->format!( "0x{:x}" , command. vmaddr) , c->"-" ] ) ;
357357 table. add_row ( row ! [ Fcc ->"vmsize" , Fyc ->format!( "0x{:x}" , command. vmsize) , c->"-" ] ) ;
358358 table. add_row ( row ! [ Fcc ->"fileoff" , Fyc ->format!( "0x{:x}" , command. fileoff) , c->"-" ] ) ;
@@ -365,7 +365,7 @@ fn print_segment_command32(command: &SegmentCommand32, table: &mut Table) {
365365
366366fn print_segment_command64 ( command : & SegmentCommand64 , table : & mut Table ) {
367367 print_lc_cmd_and_cmdsize ( command. cmd , command. cmdsize , table) ;
368- print_segname_bytes_array ( & command. segname , table) ;
368+ print_segname_or_sectname_bytes_array ( & command. segname , table) ;
369369 table. add_row ( row ! [ Fcc ->"vmaddr" , Fyc ->format!( "0x{:x}" , command. vmaddr) , c->"-" ] ) ;
370370 table. add_row ( row ! [ Fcc ->"vmsize" , Fyc ->format!( "0x{:x}" , command. vmsize) , c->"-" ] ) ;
371371 table. add_row ( row ! [ Fcc ->"fileoff" , Fyc ->format!( "0x{:x}" , command. fileoff) , c->"-" ] ) ;
@@ -376,7 +376,7 @@ fn print_segment_command64(command: &SegmentCommand64, table: &mut Table) {
376376 print_segment_flags ( command. flags , table) ;
377377}
378378
379- fn print_segname_bytes_array ( bytes : & [ u8 ] , table : & mut Table ) {
379+ fn print_segname_or_sectname_bytes_array ( bytes : & [ u8 ] , table : & mut Table ) {
380380 let mut result = String :: from ( "[" ) ;
381381 for ( index, & byte) in bytes. iter ( ) . enumerate ( ) {
382382 if index % 4 == 0 && index != 0 {
@@ -455,8 +455,8 @@ fn print_sections_for_segment(sections: &Vec<Section>, table: &mut Table) {
455455}
456456
457457fn print_section32 ( section : & Section32 , table : & mut Table ) {
458- print_segname_bytes_array ( & section. sectname , table) ;
459- print_segname_bytes_array ( & section. segname , table) ;
458+ print_segname_or_sectname_bytes_array ( & section. sectname , table) ;
459+ print_segname_or_sectname_bytes_array ( & section. segname , table) ;
460460 table. add_row ( row ! [ Fcc ->"addr" , Fyc ->format!( "0x{:x}" , section. addr) , c->"-" ] ) ;
461461 table. add_row ( row ! [ Fcc ->"size" , Fyc ->format!( "0x{:x}" , section. size) , c->"-" ] ) ;
462462 table. add_row ( row ! [ Fcc ->"offset" , Fyc ->format!( "0x{:x}" , section. offset) , c->"-" ] ) ;
@@ -469,8 +469,8 @@ fn print_section32(section: &Section32, table: &mut Table) {
469469}
470470
471471fn print_section64 ( section : & Section64 , table : & mut Table ) {
472- print_segname_bytes_array ( & section. sectname , table) ;
473- print_segname_bytes_array ( & section. segname , table) ;
472+ print_segname_or_sectname_bytes_array ( & section. sectname , table) ;
473+ print_segname_or_sectname_bytes_array ( & section. segname , table) ;
474474 table. add_row ( row ! [ Fcc ->"addr" , Fyc ->format!( "0x{:x}" , section. addr) , c->"-" ] ) ;
475475 table. add_row ( row ! [ Fcc ->"size" , Fyc ->format!( "0x{:x}" , section. size) , c->"-" ] ) ;
476476 table. add_row ( row ! [ Fcc ->"offset" , Fyc ->format!( "0x{:x}" , section. offset) , c->"-" ] ) ;
0 commit comments