[PATCH] D135887: [XOCFF] llvvm-readobj support display symbol table of loader section of xcoff object file.

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 13:22:53 PDT 2022


DiggerLin added a comment.

> the documentation: it's ELF-specific, because no other format supported the option yet. That's not a reason not to move the option out of the ELF-specific options section.

"MACH-O SPECIFIC OPTIONS" 
there is --macho-dsymtab in MachO, if move out the ELF-specific options , do we want to delete MachO's "--macho-dsymtab" instead of using  --dyn-syms

> `--dyn-syms` is already not in the ELF-specific area, so perhaps somebody has implemented it for another file format but forgot to update the docs?

I search the function "printDynamicTable()" which only implemented on ELFDumper.cpp.

> how about the code be moved into printDynamicSymbols and then make `--loader-section-symbols` an alias of `--dyn-syms`. A similar approach could be adopted for the --loader-section-relocations` option, which would be similar to printing dynamic relocations for ELF, I expect.

I can make `--loader-section-symbols` an alias of `--dyn-syms` .

when user specific "--loader-section-symbols" , The output will look as

  Loader Section {
       Loader Section Symbols {
         Symbol {
          ......
         }
       Symbol {
          ......
         }
    }
  
  when user specific "--loader-section-relocation" , The output will look as 
    Loader Section {
     Loader Section Relocations {
        Relocation {
        ......
       }
        Relocation {
        ......
       }
    }

But If the code be moved into printDynamicSymbols" , it can not archive following

  when user specific "--loader-section-symbols --loader-section-relocation --loader-section-header" , The output will look as 
    Loader Section {
       Header {
         .......
       }
     
     Loader Section Symbols {
         Symbol {
          ......
         }
       Symbol {
          ......
         }
  
     Loader Section Relocations {
        Relocation {
        ......
       }
        Relocation {
        ......
       }
    }

And I will add new option  "--loader-section" later will all the content of loader section at one time. (equal to " loader-section-symbols  + loader-section-relocation   +  loader-section-header");


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135887



More information about the llvm-commits mailing list