File tree 4 files changed +12
-6
lines changed
4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ impl ElfSectionsTag {
45
45
}
46
46
}
47
47
48
- #[ derive( Clone ) ]
48
+ #[ derive( Clone , Debug ) ]
49
49
pub struct ElfSectionIter {
50
50
current_section : * const u8 ,
51
51
remaining_sections : u32 ,
@@ -78,14 +78,15 @@ impl Iterator for ElfSectionIter {
78
78
}
79
79
}
80
80
81
+ #[ derive( Debug ) ]
81
82
pub struct ElfSection {
82
83
inner : * const u8 ,
83
84
string_section : * const u8 ,
84
85
entry_size : u32 ,
85
86
}
86
87
87
88
#[ derive( Debug ) ]
88
- #[ repr( C ) ]
89
+ #[ repr( C , packed ) ]
89
90
struct ElfSectionInner32 {
90
91
name_index : u32 ,
91
92
typ : u32 ,
@@ -100,7 +101,7 @@ struct ElfSectionInner32 {
100
101
}
101
102
102
103
#[ derive( Debug ) ]
103
- #[ repr( C ) ]
104
+ #[ repr( C , packed ) ]
104
105
struct ElfSectionInner64 {
105
106
name_index : u32 ,
106
107
typ : u32 ,
Original file line number Diff line number Diff line change 1
- #[ repr( C ) ]
1
+ #[ derive( Debug ) ]
2
+ #[ repr( C , packed) ]
2
3
pub struct Tag {
3
4
pub typ : u32 ,
4
5
pub size : u32 ,
5
6
// tag specific fields
6
7
}
7
8
9
+ #[ derive( Debug ) ]
8
10
pub struct TagIter {
9
11
pub current : * const Tag ,
10
12
}
Original file line number Diff line number Diff line change 1
1
#![ no_std]
2
2
3
+ #![ deny( missing_debug_implementations) ]
4
+
3
5
use core:: fmt;
4
6
5
7
use header:: { Tag , TagIter } ;
@@ -33,7 +35,7 @@ pub struct BootInformation {
33
35
inner : * const BootInformationInner ,
34
36
}
35
37
36
- #[ repr( C ) ]
38
+ #[ repr( C , packed ) ]
37
39
struct BootInformationInner {
38
40
total_size : u32 ,
39
41
_reserved : u32 ,
Original file line number Diff line number Diff line change 1
1
use header:: { Tag , TagIter } ;
2
2
3
- #[ repr( packed) ]
4
3
#[ derive( Debug ) ]
4
+ #[ repr( C , packed) ]
5
5
pub struct ModuleTag {
6
6
typ : u32 ,
7
7
size : u32 ,
@@ -36,6 +36,7 @@ pub fn module_iter(iter: TagIter) -> ModuleIter {
36
36
ModuleIter { iter : iter }
37
37
}
38
38
39
+ #[ derive( Debug ) ]
39
40
pub struct ModuleIter {
40
41
iter : TagIter ,
41
42
}
You can’t perform that action at this time.
0 commit comments