File tree Expand file tree Collapse file tree 2 files changed +2
-18
lines changed
openmp/libomptarget/plugins-nextgen Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -2583,22 +2583,6 @@ struct AMDGPUGlobalHandlerTy final : public GenericGlobalHandlerTy {
2583
2583
// Store the symbol address on the device global metadata.
2584
2584
DeviceGlobal.setPtr (reinterpret_cast <void *>(SymbolAddr));
2585
2585
2586
- return Plugin::success ();
2587
- }
2588
-
2589
- private:
2590
- // / Extract the global's information from the ELF image, section, and symbol.
2591
- Error getGlobalMetadataFromELF (const DeviceImageTy &Image,
2592
- const ELF64LE::Sym &Symbol,
2593
- const ELF64LE::Shdr &Section,
2594
- GlobalTy &ImageGlobal) override {
2595
- // The global's address in AMDGPU is computed as the image begin + the ELF
2596
- // symbol value. Notice we do not add the ELF section offset.
2597
- ImageGlobal.setPtr (advanceVoidPtr (Image.getStart (), Symbol.st_value ));
2598
-
2599
- // Set the global's size.
2600
- ImageGlobal.setSize (Symbol.st_size );
2601
-
2602
2586
return Plugin::success ();
2603
2587
}
2604
2588
};
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ Error GenericGlobalHandlerTy::getGlobalMetadataFromELF(
53
53
54
54
// The global's address is computed as the image begin + the ELF section
55
55
// offset + the ELF symbol value.
56
- ImageGlobal.setPtr (
57
- advanceVoidPtr ( Image.getStart (), Section.sh_offset + Symbol.st_value ));
56
+ ImageGlobal.setPtr (advanceVoidPtr (
57
+ Image.getStart (), Section.sh_offset - Section. sh_addr + Symbol.st_value ));
58
58
59
59
// Set the global's size.
60
60
ImageGlobal.setSize (Symbol.st_size );
You can’t perform that action at this time.
0 commit comments