[gold] Add preliminary FatLTO support to the Gold plugin
authorPaul Kirth <paulkirth@google.com>
Tue, 13 Jun 2023 21:39:14 +0000 (21:39 +0000)
committerPaul Kirth <paulkirth@google.com>
Wed, 19 Jul 2023 23:07:45 +0000 (23:07 +0000)
commit421e4026111315d002879b1e7a0cf3aacd00f488
treeabf3699b6512eb08fd0d2b89ca81f64d3fdd51e3
parent3a45b843dec1bca195884aa1c5bc56bd0e6755b4
[gold] Add preliminary FatLTO support to the Gold plugin

This changes the definition if `isSectionBitcode` to only be valid for the
`.llvm.lto` section, since this API is only called from LTO, and the
`.llvmbc` section was not intended to be used for LTO. This allows the
gold plugin to keep its existing behavior without introducing any
significant changes.

Depends on D146778

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D152973
llvm/lib/Object/ObjectFile.cpp
llvm/test/LTO/X86/Inputs/bcsection.macho.s
llvm/test/LTO/X86/Inputs/llvm.lto.section.s [new file with mode: 0644]
llvm/test/LTO/X86/bcsection.ll
llvm/test/LTO/X86/llvm.lto.section.ll [new file with mode: 0644]
llvm/test/tools/gold/X86/fatlto/fatlto.invalid.s [new file with mode: 0644]
llvm/test/tools/gold/X86/fatlto/fatlto.test [new file with mode: 0644]
llvm/tools/gold/gold-plugin.cpp