@@ -116,22 +116,22 @@ class SectionEntry {
116
116
// / linker.
117
117
class RelocationEntry {
118
118
public:
119
- // / SectionID - the section this relocation points to.
120
- unsigned SectionID;
121
-
122
119
// / Offset - offset into the section.
123
120
uint64_t Offset;
124
121
125
- // / RelType - relocation type.
126
- uint32_t RelType;
127
-
128
122
// / Addend - the relocation addend encoded in the instruction itself. Also
129
123
// / used to make a relocation section relative instead of symbol relative.
130
124
int64_t Addend;
131
125
126
+ // / SectionID - the section this relocation points to.
127
+ unsigned SectionID;
128
+
129
+ // / RelType - relocation type.
130
+ uint32_t RelType;
131
+
132
132
struct SectionPair {
133
- uint32_t SectionA;
134
- uint32_t SectionB;
133
+ uint32_t SectionA;
134
+ uint32_t SectionB;
135
135
};
136
136
137
137
// / SymOffset - Section offset of the relocation entry's symbol (used for GOT
@@ -141,36 +141,36 @@ class RelocationEntry {
141
141
SectionPair Sections;
142
142
};
143
143
144
- // / True if this is a PCRel relocation (MachO specific).
145
- bool IsPCRel;
146
-
147
144
// / The size of this relocation (MachO specific).
148
145
unsigned Size;
149
146
147
+ // / True if this is a PCRel relocation (MachO specific).
148
+ bool IsPCRel : 1 ;
149
+
150
150
// ARM (MachO and COFF) specific.
151
- bool IsTargetThumbFunc = false ;
151
+ bool IsTargetThumbFunc : 1 ;
152
152
153
153
RelocationEntry (unsigned id, uint64_t offset, uint32_t type, int64_t addend)
154
- : SectionID(id ), Offset(offset ), RelType(type ), Addend(addend ),
155
- SymOffset (0 ), IsPCRel( false ), Size( 0 ), IsTargetThumbFunc(false ) {}
154
+ : Offset(offset ), Addend(addend ), SectionID(id ), RelType(type ),
155
+ SymOffset (0 ), Size( 0 ), IsPCRel( false ), IsTargetThumbFunc(false ) {}
156
156
157
157
RelocationEntry (unsigned id, uint64_t offset, uint32_t type, int64_t addend,
158
158
uint64_t symoffset)
159
- : SectionID(id ), Offset(offset ), RelType(type ), Addend(addend ),
160
- SymOffset(symoffset), IsPCRel( false ), Size( 0 ),
159
+ : Offset(offset ), Addend(addend ), SectionID(id ), RelType(type ),
160
+ SymOffset(symoffset), Size( 0 ), IsPCRel( false ),
161
161
IsTargetThumbFunc(false ) {}
162
162
163
163
RelocationEntry (unsigned id, uint64_t offset, uint32_t type, int64_t addend,
164
164
bool IsPCRel, unsigned Size)
165
- : SectionID(id ), Offset(offset ), RelType(type ), Addend(addend ),
166
- SymOffset(0 ), IsPCRel(IsPCRel ), Size(Size ), IsTargetThumbFunc(false ) {}
165
+ : Offset(offset ), Addend(addend ), SectionID(id ), RelType(type ),
166
+ SymOffset(0 ), Size(Size ), IsPCRel(IsPCRel ), IsTargetThumbFunc(false ) {}
167
167
168
168
RelocationEntry (unsigned id, uint64_t offset, uint32_t type, int64_t addend,
169
169
unsigned SectionA, uint64_t SectionAOffset, unsigned SectionB,
170
170
uint64_t SectionBOffset, bool IsPCRel, unsigned Size)
171
- : SectionID(id), Offset(offset), RelType(type ),
172
- Addend(SectionAOffset - SectionBOffset + addend ), IsPCRel(IsPCRel),
173
- Size(Size), IsTargetThumbFunc(false ) {
171
+ : Offset(offset), Addend(SectionAOffset - SectionBOffset + addend ),
172
+ SectionID(id), RelType(type), Size(Size ), IsPCRel(IsPCRel),
173
+ IsTargetThumbFunc(false ) {
174
174
Sections.SectionA = SectionA;
175
175
Sections.SectionB = SectionB;
176
176
}
@@ -179,9 +179,9 @@ class RelocationEntry {
179
179
unsigned SectionA, uint64_t SectionAOffset, unsigned SectionB,
180
180
uint64_t SectionBOffset, bool IsPCRel, unsigned Size,
181
181
bool IsTargetThumbFunc)
182
- : SectionID(id), Offset(offset), RelType(type ),
183
- Addend(SectionAOffset - SectionBOffset + addend ), IsPCRel(IsPCRel),
184
- Size(Size), IsTargetThumbFunc(IsTargetThumbFunc) {
182
+ : Offset(offset), Addend(SectionAOffset - SectionBOffset + addend ),
183
+ SectionID(id), RelType(type), Size(Size ), IsPCRel(IsPCRel),
184
+ IsTargetThumbFunc(IsTargetThumbFunc) {
185
185
Sections.SectionA = SectionA;
186
186
Sections.SectionB = SectionB;
187
187
}
0 commit comments