[PATCH] D112735: export unique symbol list with llvm-nm new option "--export-symbols"

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 07:48:50 PST 2022


DiggerLin added inline comments.


================
Comment at: llvm/test/tools/llvm-nm/XCOFF/export-symbols.test:119
+  - Name:            .func
+    Section:         .text
+    Type:            0x20
----------------
jhenderson wrote:
> DiggerLin wrote:
> > jhenderson wrote:
> > > I might have missed it, but I think this is the only .text symbol? I believe you want a .text symbol that is actually exported (to show that such symbols can be exported). It's okay for this to be combined with another property that is being tested (e.g. protected visibility).
> >     Name:            .func
> >     Section:         .text 
> > 
> > means the symbol ".func" in the .text section.
> > 
> >    Name:  .text
> >   Section: .text
> > 
> > means the symbol ".text" in the .text section.
> > 
> >     Name:            .func
> >     Section:         .text 
> >  
> >    test 
> > 
> > > Do not export global symbols beginning with  "."
> > 
> > 
> > 
> > 
> When I say ".text" symbol, I mean a symbol in ".text". The current logic has `SecIter->isText()` as a possible condition for exporting. The `.func` test case hits this, but is then not exported for other reasons. You need a test case that also hits this, and is exported. Otherwise, you could delete that part of the conditional and you'd see no test failures.
I changed the 
    Name:            __tf1_tf1value
    Section:         .data 

-->

    Name:            __tf1_tf1value
    Section:         .text




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112735



More information about the llvm-commits mailing list