lld/AMDGPU: Fix asserts if no object files are involved in link
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 8 Apr 2022 17:22:23 +0000 (13:22 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 8 Apr 2022 18:18:52 +0000 (14:18 -0400)
commit63fe6d7eae2991f6d1749a413a72c4f26a5a457f
treeba2a4f0030f9ebd95d7da41d1c3948b466cd7782
parentc5f8a0a1e929ea41bd3e0d781c6b394a3f619427
lld/AMDGPU: Fix asserts if no object files are involved in link

Fixes issue 47690. The reproduction steps produced a shared object
from clang directly, and then fed the shared object back into
lld. With no regular object files, this assert was hit. I'm not sure
if we need to or should be looking for equivalent fields in shared
objects.
lld/ELF/Arch/AMDGPU.cpp
lld/ELF/SyntheticSections.cpp
lld/test/ELF/amdgpu-elf-flags.s