[all-commits] [llvm/llvm-project] 7aef8b: [OpenMP] Make section variable external to prevent...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Feb 24 07:57:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7aef8b3754a28e0856a8300980786a45bf7b4cd4
      https://github.com/llvm/llvm-project/commit/7aef8b3754a28e0856a8300980786a45bf7b4cd4
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-02-24 (Thu, 24 Feb 2022)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/test/Frontend/embed-object.ll
    M llvm/lib/Transforms/Utils/ModuleUtils.cpp

  Log Message:
  -----------
  [OpenMP] Make section variable external to prevent collisions

Summary:
We use a section to embed offloading code into the host for later
linking. This is normally unique to the translation unit as it is thrown
away during linking. However, if the user performs a relocatable link
the sections will be merged and we won't be able to access the files
stored inside. This patch changes the section variables to have external
linkage and a name defined by the section name, so if two sections are
combined during linking we get an error.




More information about the All-commits mailing list