This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Allow multiple weak symbols to be loaded from the fat binary
ClosedPublic

Authored by grokos on Mar 21 2017, 1:30 PM.

Details

Summary

In Fortran, when linking multiple object files containing declarations to external symbols, the linker does not consolidate all weak declarations into one; instead, it allows multiple weak symbols to refer to the same external symbol. This causes problem when the fat binary is loaded from libomptarget, as the initial assumption was that a static symbol could only be loaded once, i.e. it would indicate some error if the fat binary contained the same symbol twice. This assumption does not hold true for Fortran executables, so for the sake of compatibility we need to allow the library to map multiple weak symbols.

Diff Detail

Repository
rL LLVM

Event Timeline

grokos created this revision.Mar 21 2017, 1:30 PM
This revision is now accepted and ready to land.Mar 22 2017, 12:53 AM
This revision was automatically updated to reflect the committed changes.