Skip to content
  1. Oct 03, 2019
  2. Oct 02, 2019
  3. Oct 01, 2019
  4. Sep 27, 2019
  5. Sep 25, 2019
  6. Sep 23, 2019
  7. Sep 21, 2019
  8. Sep 20, 2019
  9. Sep 17, 2019
  10. Sep 06, 2019
    • George Rimar's avatar
      [llvm-readelf] - Print unknown st_other value if present in GNU output. · edfd276c
      George Rimar authored
      This is a fix for https://bugs.llvm.org/show_bug.cgi?id=40785.
      
      llvm-readelf does not print the st_value of the symbol when
      st_value has any non-visibility bits set.
      
      This patch:
      
      * Aligns "Ndx" row for the default and a new cases.
      (it was 1 space character off for the case when "PROTECTED" visibility was printed)
      
      * Prints "[<other>: 0x??]" for symbols which has an additional st_other bits set.
      In compare with GNU, this logic is a bit simpler and seems to be more consistent.
      
      For MIPS GNU can print named flags, though can't print a mix of them:
      0: 00000000 0 NOTYPE LOCAL DEFAULT UND 
      1: 00000000 0 NOTYPE GLOBAL DEFAULT [OPTIONAL] UND a1
      2: 00000000 0 NOTYPE GLOBAL DEFAULT [MIPS PLT] UND a2
      3: 00000000 0 NOTYPE GLOBAL DEFAULT [MIPS PIC] UND a3
      4: 00000000 0 NOTYPE GLOBAL DEFAULT [MICROMIPS] UND a4
      5: 00000000 0 NOTYPE GLOBAL DEFAULT [MIPS16] UND a5
      6: 00000000 0 NOTYPE GLOBAL DEFAULT [<other>: c] UND b1
      7: 00000000 0 NOTYPE GLOBAL DEFAULT [<other>: 28] UND b2
      
      On PPC64 it can print a localentry value that is encoded in the high bits of st_other
      63: 0000000000000850 208 FUNC GLOBAL DEFAULT [<localentry>: 8] 12
      
      We chose to print the raw st_other field, prefixed with '0x'.
      
      Differential revision: https://reviews.llvm.org/D67094
      
      llvm-svn: 371201
      edfd276c
    • Fangrui Song's avatar
      [llvm-readobj][yaml2obj] Support SHT_LLVM_SYMPART, SHT_LLVM_PART_EHDR and SHT_LLVM_PART_PHDR · 9d2504b6
      Fangrui Song authored
      See http://lists.llvm.org/pipermail/llvm-dev/2019-February/130583.html
      and D60242 for the lld partition feature.
      
      This patch:
      
      * Teaches yaml2obj to parse the 3 section types.
      * Teaches llvm-readobj/llvm-readelf to dump the 3 section types.
      
      There is no test for SHT_LLVM_DEPENDENT_LIBRARIES in llvm-readobj. Add
      it as well.
      
      Reviewed By: thakis
      
      Differential Revision: https://reviews.llvm.org/D67228
      
      llvm-svn: 371157
      9d2504b6
  11. Sep 05, 2019
    • George Rimar's avatar
      [llvm-readelf] - Allow dumping dynamic symbols when there is no program headers. · 4e14bf71
      George Rimar authored
      D62179 introduced a regression. llvm-readelf lose the ability to dump the dynamic symbols
      when there is .dynamic section with a DT_SYMTAB, but there are no program headers:
      https://reviews.llvm.org/D62179#1652778
      
      Below is a program flow before the D62179 change:
      
      1) Find SHT_DYNSYM.
      2) Find there is no PT_DYNAMIC => don't try to parse it.
      3) Print dynamic symbols using information about them found on step (1).
      
      And after the change it became:
      
      1) Find SHT_DYNSYM.
      2) Find there is no PT_DYNAMIC => find SHT_DYNAMIC.
      3) Parse dynamic table, but fail to handle the DT_SYMTAB because of the absence of the PT_LOAD. Report the "Virtual address is not in any segment" error.
      
      This patch fixes the issue. For doing this it checks that the value of DT_SYMTAB was
      mapped to a segment. If not - it ignores it.
      
      Differential revision: https://reviews.llvm.org/D67078
      
      llvm-svn: 371071
      4e14bf71
  12. Aug 30, 2019
    • Martin Storsjö's avatar
      [COFF] Add a ResourceSectionRef method for getting resource contents · 94382217
      Martin Storsjö authored
      This allows llvm-readobj to print the contents of each resource
      when printing resources from an object file or executable, like it
      already does for plain .res files.
      
      This requires providing the whole COFFObjectFile to ResourceSectionRef.
      
      This supports both object files and executables. For executables,
      the DataRVA field is used as is to look up the right section.
      
      For object files, ideally we would need to complete linking of them
      and fix up all relocations to know what the DataRVA field would end up
      being. In practice, the only thing that makes sense for an RVA field
      is an ADDR32NB relocation. Thus, find a relocation pointing at this
      field, verify that it has the expected type, locate the symbol it
      points at, look up the section the symbol points at, and read from the
      right offset in that section.
      
      This works both for GNU windres object files (which use one single
      .rsrc section, with all relocations against the base of the .rsrc
      section, with the original value of the DataRVA field being the
      offset of the data from the beginning of the .rsrc section) and
      cvtres object files (with two separate .rsrc$01 and .rsrc$02 sections,
      and one symbol per data entry, with the original pre-relocated DataRVA
      field being set to zero).
      
      Differential Revision: https://reviews.llvm.org/D66820
      
      llvm-svn: 370433
      94382217
    • Dan Gohman's avatar
      [WebAssembly] Make __attribute__((used)) not imply export. · da84b688
      Dan Gohman authored
      Add an WASM_SYMBOL_NO_STRIP flag, so that __attribute__((used)) doesn't
      need to imply exporting. When targeting Emscripten, have
      WASM_SYMBOL_NO_STRIP imply exporting.
      
      Differential Revision: https://reviews.llvm.org/D62542
      
      llvm-svn: 370415
      da84b688
  13. Aug 29, 2019
  14. Aug 28, 2019
  15. Aug 27, 2019
    • Jason Liu's avatar
      [XCOFF][AIX] Generate symbol table entries with llvm-readobj · 7c72e82b
      Jason Liu authored
      Summary:
      
      This patch implements main entry and auxiliary entries of symbol table generation for llvm-readobj on AIX.
      The source code of aix_xcoff_xlc_test8.o (compile with xlc) is:
      
      -bash-4.2$ cat test8.c
      extern int i;
      extern int TestforXcoff;
      extern int fun(int i);
      static int static_i;
      char* p="abcd";
      int fun1(int j) {
        static_i++;
        j++;
        j=j+*p;
        return j;
      }
      int main() {
        i++;
        fun(i);
        return fun1(i);
      }
      
      Patch provided by DiggerLin
      
      Differential Revision: https://reviews.llvm.org/D65240
      
      llvm-svn: 370097
      7c72e82b
  16. Aug 22, 2019
  17. Aug 20, 2019
  18. Aug 19, 2019
  19. Aug 17, 2019
  20. Aug 15, 2019
    • Jonas Devlieghere's avatar
      [llvm] Migrate llvm::make_unique to std::make_unique · 0eaee545
      Jonas Devlieghere authored
      Now that we've moved to C++14, we no longer need the llvm::make_unique
      implementation from STLExtras.h. This patch is a mechanical replacement
      of (hopefully) all the llvm::make_unique instances across the monorepo.
      
      llvm-svn: 369013
      0eaee545
    • Seiya Nuta's avatar
      [llvm-readobj][MachO] Fix section type printing · 0a3b1b26
      Seiya Nuta authored
      Summary:
      Currently, llvm-readobj mistakenly decodes section type as section attribute.
      
      This patch fixes the bug and affected tests.
      
      Reviewers: JDevlieghere, jhenderson, rupprecht, alexshap, echristo
      
      Reviewed By: jhenderson, rupprecht, alexshap, echristo
      
      Subscribers: javed.absar, rupprecht, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66075
      
      llvm-svn: 368974
      0a3b1b26
  21. Aug 14, 2019
Loading