diff --git a/projects/clr/hipamd/bin/hipcc b/projects/clr/hipamd/bin/hipcc index cea6211a87..68e4a96721 100755 --- a/projects/clr/hipamd/bin/hipcc +++ b/projects/clr/hipamd/bin/hipcc @@ -498,6 +498,10 @@ foreach $arg (@ARGV) $obj = "$tmpdir/$obj"; my $fileType = `file $obj`; my $isObj = ($fileType =~ m/ELF/ or $fileType =~ m/COFF/); + if ($fileType =~ m/ELF/) { + my $sections = `readelf -e -W $obj`; + $isObj = !($sections =~ m/__CLANG_OFFLOAD_BUNDLE__/); + } $allIsObj = ($allIsObj and $isObj); if ($isObj) { $realObjs = ($realObjs . " " . $obj);