[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-07-05 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi updated https://github.com/llvm/llvm-project/pull/91310 >From a9682a1eefc360c9f0e517601d0d8cc4b5e9f16f Mon Sep 17 00:00:00 2001 From: Nick Zavaritsky Date: Sun, 5 May 2024 10:20:52 + Subject: [PATCH] [BPF] Fix linking issues in static map initializers When BPF obj

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-06-30 Thread Nick Zavaritsky via cfe-commits
mejedi wrote: @yonghong-song @efriedma-quic Any chance we could get it merged? https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-06-17 Thread Nick Zavaritsky via cfe-commits
mejedi wrote: ping https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-06-10 Thread Nick Zavaritsky via cfe-commits
mejedi wrote: @yonghong-song @dwblaikie > Is there some test coverage that shows that unreferenced variables/functions > aren't included in the output? Test added. https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-comm

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-06-10 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi updated https://github.com/llvm/llvm-project/pull/91310 >From defe9d0fe64edafdc2e1ff5905c36bf229323692 Mon Sep 17 00:00:00 2001 From: Nick Zavaritsky Date: Sun, 5 May 2024 10:20:52 + Subject: [PATCH] [BPF] Fix linking issues in static map initializers When BPF obj

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-27 Thread Nick Zavaritsky via cfe-commits
mejedi wrote: Ping. https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-17 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi updated https://github.com/llvm/llvm-project/pull/91310 >From 88f895cc1a761681edd1dff15170ab42d563da49 Mon Sep 17 00:00:00 2001 From: Nick Zavaritsky Date: Sun, 5 May 2024 10:20:52 + Subject: [PATCH] [BPF] Fix linking issues in static map initializers When BPF obj

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-17 Thread Nick Zavaritsky via cfe-commits
@@ -1950,8 +1950,22 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) { if (D->hasAttr()) return CGM.GetWeakRefReference(D).getPointer(); -if (auto FD = dyn_cast(D)) - return CGM.GetAddrOfFunction(FD); +if (auto FD = dyn_cast(D)) {

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-17 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi edited https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-17 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi edited https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-17 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi edited https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-17 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi updated https://github.com/llvm/llvm-project/pull/91310 >From 440f62d438810fbd1166a9eb3dbfbe10957fba58 Mon Sep 17 00:00:00 2001 From: Nick Zavaritsky Date: Sun, 5 May 2024 10:20:52 + Subject: [PATCH] [BPF] Fix linking issues in static map initializers When BPF obj

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-08 Thread Nick Zavaritsky via cfe-commits
@@ -1950,8 +1950,22 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) { if (D->hasAttr()) return CGM.GetWeakRefReference(D).getPointer(); -if (auto FD = dyn_cast(D)) - return CGM.GetAddrOfFunction(FD); +if (auto FD = dyn_cast(D)) {

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-07 Thread Nick Zavaritsky via cfe-commits
mejedi wrote: cc @anakryiko https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-07 Thread Nick Zavaritsky via cfe-commits
mejedi wrote: CC @yonghong-song https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-07 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi updated https://github.com/llvm/llvm-project/pull/91310 >From e518bdfb86b06fa8bc447934293623a803a7f630 Mon Sep 17 00:00:00 2001 From: Nick Zavaritsky Date: Sun, 5 May 2024 10:20:52 + Subject: [PATCH] [BPF] Fix linking issues in static map initializers When BPF obj

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-07 Thread Nick Zavaritsky via cfe-commits
https://github.com/mejedi created https://github.com/llvm/llvm-project/pull/91310 When BPF object files are linked with bpftool, every symbol must be accompanied by BTF info. Ensure that extern functions referenced by global variable initializers are included in BTF. The primary motivation is