File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -564,6 +564,22 @@ void SectionChunk::getBaserels(std::vector<Baserel> *res) {
564
564
continue ;
565
565
res->emplace_back (rva + rel.VirtualAddress , ty);
566
566
}
567
+
568
+ // Insert a 64-bit relocation for CHPEMetadataPointer in the native load
569
+ // config of a hybrid ARM64X image. Its value will be set in prepareLoadConfig
570
+ // to match the value in the EC load config, which is expected to be
571
+ // a relocatable pointer to the __chpe_metadata symbol.
572
+ COFFLinkerContext &ctx = file->symtab .ctx ;
573
+ if (ctx.hybridSymtab && ctx.symtab .loadConfigSym &&
574
+ ctx.symtab .loadConfigSym ->getChunk () == this &&
575
+ ctx.hybridSymtab ->loadConfigSym &&
576
+ ctx.symtab .loadConfigSize >=
577
+ offsetof (coff_load_configuration64, CHPEMetadataPointer) +
578
+ sizeof (coff_load_configuration64::CHPEMetadataPointer))
579
+ res->emplace_back (
580
+ ctx.symtab .loadConfigSym ->getRVA () +
581
+ offsetof (coff_load_configuration64, CHPEMetadataPointer),
582
+ IMAGE_REL_BASED_DIR64);
567
583
}
568
584
569
585
// MinGW specific.
Original file line number Diff line number Diff line change 118
118
// BASERELOC: BaseReloc [
119
119
// BASERELOC-NEXT: Entry {
120
120
// BASERELOC-NEXT: Type: DIR64
121
+ // BASERELOC-NEXT: Address: 0x10C8
122
+ // BASERELOC-NEXT: }
123
+ // BASERELOC-NEXT: Entry {
124
+ // BASERELOC-NEXT: Type: DIR64
121
125
// BASERELOC-NEXT: Address: 0x1208
122
126
// BASERELOC-NEXT: }
123
127
// BASERELOC-NEXT: Entry {
124
- // BASERELOC: Type: DIR64
128
+ // BASERELOC-NEXT: Type: DIR64
125
129
// BASERELOC-NEXT: Address: 0x2074
126
130
// BASERELOC-NEXT: }
127
131
You can’t perform that action at this time.
0 commit comments