mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 21:06:57 +08:00
lto: Don't check obj.found for offload section
obj.found is the number of LTO symbols. We should include the offload section when it is used by linker even if there are no LTO symbols. PR lto/116361 * lto-plugin.c (claim_file_handler_v2): Don't check obj.found for the offload section. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
parent
c429d509a8
commit
cb51e0b236
@ -1320,7 +1320,7 @@ claim_file_handler_v2 (const struct ld_plugin_input_file *file,
|
||||
if (*can_be_claimed && !obj.offload && offload_files_last_lto == NULL)
|
||||
offload_files_last_lto = offload_files_last;
|
||||
|
||||
if (obj.offload && known_used && obj.found > 0)
|
||||
if (obj.offload && known_used)
|
||||
{
|
||||
/* Add file to the list. The order must be exactly the same as the final
|
||||
order after recompilation and linking, otherwise host and target tables
|
||||
|
Loading…
Reference in New Issue
Block a user