llvm-project/llvm/test/CodeGen/BPF/CORE
Yonghong Song 6db023b99b [BPF] add "llvm." prefix to BPF internally created globals
Currently, BPF backend creates some global variables with name like
  <type_name>:<reloc_type>:<patch_imm>$<access_str>
to carry certain information to BPF backend.

With direct clang compilation, the following code in
   llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
is triggered and the above globals are emitted to the ELF file.
(clang enabled this as opt flag -faddrsig is on by default.)
   if (TM.Options.EmitAddrsig) {
    // Emit address-significance attributes for all globals.
    OutStreamer->EmitAddrsig();
    for (const GlobalValue &GV : M.global_values())
      if (!GV.use_empty() && !GV.isThreadLocal() &&
          !GV.hasDLLImportStorageClass() && !GV.getName().startswith("llvm.") &&
          !GV.hasAtLeastLocalUnnamedAddr())
        OutStreamer->EmitAddrsigSym(getSymbol(&GV));
  }
...
 10162: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND tcp_sock:0:2048$0:117
 10163: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND tcp_sock:0:2112$0:126:0
 10164: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND tcp_sock:1:8$0:31:6
...
While in llc, those globals are not emited since EmitAddrsig
default option is false for llc. The llc flag "-addrsig" can be used to
enable the above code.

This patch added "llvm." prefix to these internal globals so that
they can be ignored in the above codes and possible other
places.

Differential Revision: https://reviews.llvm.org/D70703
2019-11-25 21:34:46 -08:00
..
field-reloc-alu32.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
field-reloc-bitfield-1.ll [BPF] Fix CO-RE bugs with bitfields 2019-11-04 20:08:05 -08:00
field-reloc-bitfield-2.ll [BPF] Fix CO-RE bugs with bitfields 2019-11-04 20:08:05 -08:00
intrinsic-array.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-byte-size-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-byte-size-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-byte-size-3.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-byte-size-4.ll [BPF] fix a bug in __builtin_preserve_field_info() with FIELD_BYTE_SIZE 2019-11-03 08:18:28 -08:00
intrinsic-fieldinfo-existence-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-existence-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-existence-3.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-lshift-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-lshift-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-rshift-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-rshift-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-rshift-3.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-signedness-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-signedness-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-fieldinfo-signedness-3.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-struct.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
intrinsic-transforms.ll [Transforms] Do not drop !preserve.access.index metadata 2019-08-03 23:41:26 +00:00
intrinsic-union.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
no-elf-ama-symbol.ll [BPF] add "llvm." prefix to BPF internally created globals 2019-11-25 21:34:46 -08:00
offset-reloc-access-str.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-basic.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-cast-array-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-cast-array-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-cast-struct-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-cast-struct-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-cast-struct-3.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-cast-union-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-cast-union-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-end-load.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-end-ret.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-fieldinfo-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-fieldinfo-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-global-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-global-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-global-3.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-ignore.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-middle-chain.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-multi-array-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-multi-array-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-multilevel.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-pointer-1.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-pointer-2.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-struct-anonymous.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-struct-array.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-typedef-array.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-typedef-struct.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-typedef-union.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-typedef.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00
offset-reloc-union.ll [BPF] fix a CO-RE issue with -mattr=+alu32 2019-10-25 14:27:25 -07:00