forked from OSchip/llvm-project
6db023b99b
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 |
||
---|---|---|
.. | ||
field-reloc-alu32.ll | ||
field-reloc-bitfield-1.ll | ||
field-reloc-bitfield-2.ll | ||
intrinsic-array.ll | ||
intrinsic-fieldinfo-byte-size-1.ll | ||
intrinsic-fieldinfo-byte-size-2.ll | ||
intrinsic-fieldinfo-byte-size-3.ll | ||
intrinsic-fieldinfo-byte-size-4.ll | ||
intrinsic-fieldinfo-existence-1.ll | ||
intrinsic-fieldinfo-existence-2.ll | ||
intrinsic-fieldinfo-existence-3.ll | ||
intrinsic-fieldinfo-lshift-1.ll | ||
intrinsic-fieldinfo-lshift-2.ll | ||
intrinsic-fieldinfo-rshift-1.ll | ||
intrinsic-fieldinfo-rshift-2.ll | ||
intrinsic-fieldinfo-rshift-3.ll | ||
intrinsic-fieldinfo-signedness-1.ll | ||
intrinsic-fieldinfo-signedness-2.ll | ||
intrinsic-fieldinfo-signedness-3.ll | ||
intrinsic-struct.ll | ||
intrinsic-transforms.ll | ||
intrinsic-union.ll | ||
no-elf-ama-symbol.ll | ||
offset-reloc-access-str.ll | ||
offset-reloc-basic.ll | ||
offset-reloc-cast-array-1.ll | ||
offset-reloc-cast-array-2.ll | ||
offset-reloc-cast-struct-1.ll | ||
offset-reloc-cast-struct-2.ll | ||
offset-reloc-cast-struct-3.ll | ||
offset-reloc-cast-union-1.ll | ||
offset-reloc-cast-union-2.ll | ||
offset-reloc-end-load.ll | ||
offset-reloc-end-ret.ll | ||
offset-reloc-fieldinfo-1.ll | ||
offset-reloc-fieldinfo-2.ll | ||
offset-reloc-global-1.ll | ||
offset-reloc-global-2.ll | ||
offset-reloc-global-3.ll | ||
offset-reloc-ignore.ll | ||
offset-reloc-middle-chain.ll | ||
offset-reloc-multi-array-1.ll | ||
offset-reloc-multi-array-2.ll | ||
offset-reloc-multilevel.ll | ||
offset-reloc-pointer-1.ll | ||
offset-reloc-pointer-2.ll | ||
offset-reloc-struct-anonymous.ll | ||
offset-reloc-struct-array.ll | ||
offset-reloc-typedef-array.ll | ||
offset-reloc-typedef-struct.ll | ||
offset-reloc-typedef-union.ll | ||
offset-reloc-typedef.ll | ||
offset-reloc-union.ll |