[BPF] generate BTF_KIND_VARs for all non-static globals

Enable to generate BTF_KIND_VARs for non-static
default-section globals which is not allowed previously.
Modified the existing test case to accommodate the new change.

Also removed unused linkage enum members VAR_GLOBAL_TENTATIVE and
VAR_GLOBAL_EXTERNAL.

Differential Revision: https://reviews.llvm.org/D70145
diff --git a/llvm/lib/Target/BPF/BTFDebug.cpp b/llvm/lib/Target/BPF/BTFDebug.cpp
index db551e7..b2d5fc3 100644
--- a/llvm/lib/Target/BPF/BTFDebug.cpp
+++ b/llvm/lib/Target/BPF/BTFDebug.cpp
@@ -1076,6 +1076,11 @@
 
     SmallVector<DIGlobalVariableExpression *, 1> GVs;
     Global.getDebugInfo(GVs);
+
+    // No type information, mostly internal, skip it.
+    if (GVs.size() == 0)
+      continue;
+
     uint32_t GVTypeId = 0;
     for (auto *GVE : GVs) {
       if (SecName.startswith(".maps"))
@@ -1087,7 +1092,7 @@
 
     // Only support the following globals:
     //  . static variables
-    //  . non-static global variables with section attributes
+    //  . non-static global variables
     // Essentially means:
     //  . .bcc/.data/.rodata DataSec entities only contain static data
     //  . Other DataSec entities contain static or initialized global data.
@@ -1096,7 +1101,7 @@
     //    corresponding ELF section flags.
     auto Linkage = Global.getLinkage();
     if (Linkage != GlobalValue::InternalLinkage &&
-        (Linkage != GlobalValue::ExternalLinkage || !Global.hasSection()))
+        Linkage != GlobalValue::ExternalLinkage)
       continue;
 
     uint32_t GVarInfo = Linkage == GlobalValue::ExternalLinkage