1. Oct 21, 2022
    • Joseph Huber's avatar
      [OpenMP] Remove `-Bsymbolic` flag for device linking in the GNU toolchain · 2a9a13d9
      Joseph Huber authored
      Previously, OpenMP linking would be done explicitly in a linker stage.
      For `x86_64` offloading this would just use the host linker, which could
      be the `bfd` linker. This linker had problems linking relocations
      against variables with protected visibility so we force `-Bsymbolic`
      when linking. After the deprecation of the old offloading driver this
      code is no longer used and can be removed.
      
      Reviewed By: tianshilei1992
      
      Differential Revision: https://reviews.llvm.org/D136363
      2a9a13d9
    • Joseph Huber's avatar
      [Libomptarget] Build plugins with protected visibility by default · 429d3d4e
      Joseph Huber authored
      The plugins all define the same interface symbols. This is generally not
      a problem when calling the plugin directly from the dynamic library's
      handle. However, when calling from within the plugin itself it is
      possible for another plugin's symbols to preempt the symbols. This was
      observed with the `__tgt_rtl_is_valid_binary` call in the
      `__tgt_rtl_is_valid_binary_info` function being mapped to the x86_64
      plugin.
      
      This patch changes the default visibility to `protected` intead. This
      visibility ensures that these symbols are all externally visible from
      the plugin, but ensures their definitions are fixed within the shared
      library. Having protected visiiblity makes such symbol preemption
      impossible.
      
      Reviewed By: tianshilei1992
      
      Differential Revision: https://reviews.llvm.org/D136365
      429d3d4e
  2. Oct 20, 2022