File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -357,9 +357,7 @@ void SectionChunk::writeTo(uint8_t *buf) const {
357
357
358
358
// Apply relocations.
359
359
size_t inputSize = getSize ();
360
- for (size_t i = 0 , e = relocsSize; i < e; i++) {
361
- const coff_relocation &rel = relocsData[i];
362
-
360
+ for (const coff_relocation &rel : getRelocs ()) {
363
361
// Check for an invalid relocation offset. This check isn't perfect, because
364
362
// we don't have the relocation size, which is only known after checking the
365
363
// machine and relocation type. As a result, a relocation may overwrite the
@@ -451,8 +449,7 @@ static uint8_t getBaserelType(const coff_relocation &rel) {
451
449
// fixed by the loader if load-time relocation is needed.
452
450
// Only called when base relocation is enabled.
453
451
void SectionChunk::getBaserels (std::vector<Baserel> *res) {
454
- for (size_t i = 0 , e = relocsSize; i < e; i++) {
455
- const coff_relocation &rel = relocsData[i];
452
+ for (const coff_relocation &rel : getRelocs ()) {
456
453
uint8_t ty = getBaserelType (rel);
457
454
if (ty == IMAGE_REL_BASED_ABSOLUTE)
458
455
continue ;
You can’t perform that action at this time.
0 commit comments