[PATCH] D116852: bugfix: bpf: DATASEC names might be wrong in the BTF data

Yichun Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 21:57:08 PST 2022


agentzh updated this revision to Diff 398304.
agentzh added reviewers: yonghong-song, iii, vtjnash, RKSimon, LemonBoy.
agentzh added a comment.

Rebased to the latest main branch of llvm-project.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116852/new/

https://reviews.llvm.org/D116852

Files:
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp


Index: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -587,6 +587,8 @@
   // Determine to which section this global should be emitted.
   MCSection *TheSection = getObjFileLowering().SectionForGlobal(GV, GVKind, TM);

+  ((GlobalVariable *) GV)->setSection(TheSection->getName());
+
   // If we have a bss global going to a section that supports the
   // zerofill directive, do so here.
   if (GVKind.isBSS() && MAI->hasMachoZeroFillDirective() &&


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116852.398304.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220108/a9b7339f/attachment.bin>


More information about the llvm-commits mailing list