Skip to content
Permalink
Branch: master
Commits on Jun 12, 2019
  1. [DOC] Fix `load` instructions' syntax, function definition.

    vgxbj committed Jun 12, 2019
    Summary: In this patch, I updated `load` instruction syntax and fixed function definition. Besides, I re-named some variables to make them obey SSA rule.
    
    Reviewers: MaskRay
    
    Reviewed By: MaskRay
    
    Subscribers: llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D63186
    
    llvm-svn: 363142
Commits on Apr 12, 2019
  1. [llvm-readobj] Change variables' name to match LLVM-style. NFC.

    vgxbj committed Apr 12, 2019
    llvm-svn: 358259
Commits on Apr 10, 2019
  1. [llvm-readobj] Should declare `ListScope` for `verneed` entries.

    vgxbj committed Apr 10, 2019
    Summary: YAML mappings require keys to be unique. See: https://yaml.org/spec/1.2/spec.html#id2764652
    
    Reviewers: jhenderson, grimar, rupprecht, espindola, ruiu
    
    Reviewed By: ruiu
    
    Subscribers: ruiu, emaste, arichardson, MaskRay, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D60438
    
    llvm-svn: 358078
Commits on Apr 8, 2019
Commits on Apr 3, 2019
  1. [llvm-readobj] Add GNU style dumper for .gnu.version section

    vgxbj committed Apr 3, 2019
    Summary: Currently, `llvm-readobj` do not support GNU style dumper for symbol versioning sections. In this patch, I would like to implement dumper for `.gnu.version` section
    
    Reviewers: jhenderson, rupprecht, grimar
    
    Reviewed By: jhenderson, rupprecht
    
    Subscribers: llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D59877
    
    llvm-svn: 357578
  2. Fix typos in tests. NFC.

    vgxbj committed Apr 3, 2019
    Reviewers: Higuoxing
    
    Reviewed By: Higuoxing
    
    Subscribers: kubamracek, cfe-commits, #sanitizers, llvm-commits
    
    Tags: #clang, #sanitizers, #llvm
    
    Differential Revision: https://reviews.llvm.org/D60183
    
    llvm-svn: 357577
Commits on Mar 29, 2019
  1. [llvm-readobj] Change variable names to match LLVM-style. NFC.

    vgxbj committed Mar 29, 2019
    Summary: This patch helps change variable names to match LLVM-style
    
    Reviewers: jhenderson, Higuoxing
    
    Reviewed By: Higuoxing
    
    Subscribers: rupprecht, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D59931
    
    llvm-svn: 357230
Commits on Mar 28, 2019
  1. - Addressed comments

    vgxbj committed Mar 28, 2019
    llvm-svn: 357166
  2. - Addressed @jhenderson 's comments

    vgxbj committed Mar 28, 2019
    - Format patch
    
    llvm-svn: 357165
  3. [llvm-readobj] Add new helper function `getSymbolVersionByIndex()`

    vgxbj committed Mar 28, 2019
    Summary: When implementing `GNU style` dumper for `.gnu.version` section, we should find symbol version name by `vs_index`.
    
    Reviewers: jhenderson, rupprecht
    
    Reviewed By: rupprecht
    
    Subscribers: arphaman, rupprecht, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D59545
    
    llvm-svn: 357164
Commits on Mar 25, 2019
  1. [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` an…

    vgxbj committed Mar 25, 2019
    …d `GNU style`
    
    Summary:
    Currently, llvm-readobj can dump symbol version sections only in LLVM style. In this patch, I would like to separate these dumpers into GNU style and 
    LLVM style for future implementation.
    
    Reviewers: grimar, jhenderson, mattd, rupprecht
    
    Reviewed By: jhenderson, rupprecht
    
    Subscribers: ormris, dyung, RKSimon, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D59186
    
    llvm-svn: 356881
Commits on Mar 22, 2019
  1. [llvm-readobj] Revert bad changes

    vgxbj committed Mar 22, 2019
    llvm-svn: 356777
  2. [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` an…

    vgxbj committed Mar 22, 2019
    …d `GNU style`
    
    Summary:
    Currently, llvm-readobj can dump symbol version sections only in LLVM style. In this patch, I would like to separate these dumpers into GNU style and 
    LLVM style for future implementation.
    
    Reviewers: grimar, jhenderson, mattd, rupprecht
    
    Reviewed By: rupprecht
    
    Subscribers: llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D59186
    
    llvm-svn: 356764
Commits on Mar 21, 2019
  1. [llvm-readobj] Format codes. NFC.

    vgxbj committed Mar 21, 2019
    llvm-svn: 356664
Commits on Mar 12, 2019
  1. fix break tests after rL355922. NFCI

    vgxbj committed Mar 12, 2019
    llvm-svn: 355925
  2. [llvm-readobj] Print symbol version when dumping relocations (PR31564)

    vgxbj committed Mar 12, 2019
    Summary: This helps resolve https://bugs.llvm.org/show_bug.cgi?id=31564
    
    Reviewers: jhenderson, grimar
    
    Reviewed By: jhenderson
    
    Subscribers: rupprecht, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D59175
    
    llvm-svn: 355922
Commits on Mar 7, 2019
  1. [llvm-readobj] Dump DT_USED value as string like GNU readelf does

    vgxbj committed Mar 7, 2019
    Reviewers: jhenderson
    
    Reviewed By: jhenderson
    
    Subscribers: rupprecht, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D59089
    
    llvm-svn: 355600
Commits on Mar 6, 2019
  1. [BinaryFormat] Add DT_USED tag into dynamic section.

    vgxbj committed Mar 6, 2019
    Summary:
    This tag is documented in https://docs.oracle.com/cd/E19253-01/817-1984/chapter6-42444/index.html 
    Though I could not find some docs that describe it in detail, I found some code snippets.
    
    1.
    ```
    	/*
    	 * Look up the string in the string table and get its offset. If
    	 * this succeeds, then it is possible that there is a DT_NEEDED
    	 * dynamic entry that references it.
    	 */
    	have_string = elfedit_sec_findstr(argstate->str.sec,
    	    strpad_elt.dn_dyn.d_un.d_val, arg, &str_offset) != 0;
    	if (have_string) {
    		dyn = argstate->dynamic.data;
    		for (ndx = 0; ndx < numdyn; dyn++, ndx++) {
    			if (((dyn->d_tag == DT_NEEDED) ||
    			    (dyn->d_tag == DT_USED)) &&
    			    (dyn->d_un.d_val == str_offset))
    				goto done;
    		}
    	}
    ```
    https://github.com/kofemann/opensolaris/blob/80192cd83bf665e708269dae856f9145f7190f74/usr/src/cmd/sgs/elfedit/modules/common/syminfo.c#L512
    
    2.
    ```
        case DT_USED:
        case DT_INIT_ARRAY:
        case DT_FINI_ARRAY:
          if (do_dynamic)
            {
              if (entry->d_tag == DT_USED
              && VALID_DYNAMIC_NAME (entry->d_un.d_val))
            {
              char *name = GET_DYNAMIC_NAME (entry->d_un.d_val);
    
              if (*name)
                {
                  printf (_("Not needed object: [%s]\n"), name);
                  break;
                }
            }
    
              print_vma (entry->d_un.d_val, PREFIX_HEX);
              putchar ('\n');
            }
          break;
    ```
    http://web.mit.edu/freebsd/head/contrib/binutils/binutils/readelf.c
    
    3.
    ```
    #define DT_USED     0x7ffffffe  /* ignored - same as needed */
    ```
    https://github.com/switchbrew/switch-tools/blob/master/src/elf_common.h
    
    Reviewers: jhenderson, grimar
    
    Reviewed By: jhenderson, grimar
    
    Subscribers: emaste, krytarowski, fedor.sergeev, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D58762
    
    llvm-svn: 355468
Commits on Mar 5, 2019
  1. [ARM][MC] Update one test case in 'test/MC/Disassembler/ARM/invalid-a…

    vgxbj committed Mar 5, 2019
    …rmv7.txt'
    
    Summary:
    Instruction `[0xfe 0xf0 0x20 0xe3]` is a valid instruction on ARM-v7, which is `dbg #14`. See: 
    https://www.cl.cam.ac.uk/research/srg/han/ACS-P35/zynq/ARMv7-A-R-manual.pdf 
    (Page: 377)
    
    ```
    Encoding A1:
    DBG<c> #<option>
    
    |31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16|15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00|
    |      cond | 0  0  1  1  0| 0| 1  0| 0  0  0  0| 1  1  1  1| 0  0  0  0| 1  1  1  1|    option |
    ```
    
    Reviewers: fhahn, efriedma
    
    Reviewed By: efriedma
    
    Subscribers: javed.absar, kristof.beyls, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D58873
    
    llvm-svn: 355374
Commits on Mar 2, 2019
  1. [Transforms] fix typo in test case. NFC.

    vgxbj committed Mar 2, 2019
    llvm-svn: 355265
  2. [Codegen] fix typos in test case

    vgxbj committed Mar 2, 2019
    llvm-svn: 355264
  3. [llvm-objdump] Should print unknown d_tag in hex format

    vgxbj committed Mar 2, 2019
    Summary:
    Currently, `llvm-objdump` prints "unknown" instead of d_tag value in hex format. Because getDynamicTagAsString returns "unknown" rather than empty 
    string.
    
    Reviewers: grimar, jhenderson
    
    Reviewed By: jhenderson
    
    Subscribers: rupprecht, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D58763
    
    llvm-svn: 355262
Commits on Feb 27, 2019
  1. [llvm-objdump] Should print strings when dumping DT_RPATH, DT_RUNPATH…

    vgxbj committed Feb 27, 2019
    …, DT_SONAME, DT_AUXILIARY and DT_FILTER tags in dynamic section.
    
    Summary:
    Before:
    ```
    Dynamic Section:
      NEEDED               libpthread.so.0
      ...
      NEEDED               ld-linux-x86-64.so.2
      RPATH                0x00000000001c2e61
    ```
    
    After:
    ```
    Dynamic Section:
      NEEDED               libpthread.so.0
      ...
      NEEDED               ld-linux-x86-64.so.2
      RPATH                $ORIGIN/../lib
    ```
    
    Only a small problem here, I have no idea on choosing test case. I see there's a test 
    file(test/tools/llvm-objdump/private-headers-dynamic-section.test). But it has no DT_RPATH and DT_RUNPATH tags. Shall I replace the ELF file in the 
    Inputs dir by a new one?
    
    Reviewers: jhenderson, grimar
    
    Reviewed By: jhenderson
    
    Subscribers: srhines, rupprecht, jfb, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D58707
    
    llvm-svn: 355001
Commits on Feb 26, 2019
  1. [llvm-objdump] Add `Version Definitions` dumper

    vgxbj committed Feb 26, 2019
    Summary: `llvm-objdump` needs a `Version Definitions` dumper.
    
    Reviewers: grimar, jhenderson
    
    Reviewed By: grimar, jhenderson
    
    Subscribers: rupprecht, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D58615
    
    llvm-svn: 354871
Commits on Feb 25, 2019
  1. [llvm-objdump] Add `Version References` dumper

    vgxbj committed Feb 25, 2019
    Summary: Add symbol version dumper for [#30241](https://bugs.llvm.org/show_bug.cgi?id=30241)
    
    Reviewers: jhenderson, MaskRay, kristina, emaste, grimar
    
    Reviewed By: jhenderson, grimar
    
    Subscribers: grimar, rupprecht, jakehehrlich, llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D54697
    
    llvm-svn: 354782
Commits on Jan 18, 2019
  1. [DOCS] it it => it

    vgxbj committed Jan 18, 2019
    Summary: it it => it for LLVM Language Reference Manual
    
    Reviewers: aaron.ballman, Higuoxing, liangdzou
    
    Reviewed By: aaron.ballman, Higuoxing, liangdzou
    
    Subscribers: Higuoxing, llvm-commits
    
    Differential Revision: https://reviews.llvm.org/D56533
    
    llvm-svn: 351517
Commits on Dec 8, 2018
  1. [llvm-readobj] Little clean up inside `parseDynamicTable`

    vgxbj committed Dec 8, 2018
    Summary:
    This anoymous function actually has same logic with `Obj->toMappedAddr`.
    
    Besides, I have a question on resolving illegal value. `gnu-readelf`, `gnu-objdump` and `llvm-objdump` could parse the test file 'test/tools/llvm-objdump/Inputs/private-headers-x86_64.elf', but `llvm-readobj` will fail when parse `DT_RELR` segment. Because, the value is 0x87654321 which is illegal. So, shall we do this clean up rather then remove the checking statements inside anoymous function?
    
    ```
    if (Delta >= Phdr.p_filesz)
        return createError("Virtual address is not in any segment");
    ```
    
    Reviewers: rupprecht, jhenderson
    
    Reviewed By: jhenderson
    
    Subscribers: llvm-commits
    
    Differential Revision: https://reviews.llvm.org/D55329
    
    llvm-svn: 348701
Commits on Dec 7, 2018
  1. [yaml2obj] format some codes NFC.

    vgxbj committed Dec 7, 2018
    Summary: This line is longer than 80 characters.
    
    Subscribers: llvm-commits, jakehehrlich
    
    Differential Revision: https://reviews.llvm.org/D55419
    
    llvm-svn: 348580
  2. [yaml2obj] revert bad change

    vgxbj committed Dec 7, 2018
    llvm-svn: 348579
  3. [yaml2obj] format some codes NFC.

    vgxbj committed Dec 7, 2018
    Summary: This line is longer than 80 characters.
    
    Subscribers: llvm-commits, jakehehrlich
    
    Differential Revision: https://reviews.llvm.org/D55419
    
    llvm-svn: 348578
Commits on Dec 4, 2018
  1. [yaml2obj] Move redundant statements into a separate static function

    vgxbj committed Dec 4, 2018
    Reviewers: jhenderson, grimar
    
    Reviewed By: jhenderson
    
    Subscribers: jakehehrlich, llvm-commits
    
    Differential Revision: https://reviews.llvm.org/D55220
    
    llvm-svn: 348264
Commits on Dec 1, 2018
  1. [llvm-readobj] Improve dynamic section iteration NFC.

    vgxbj committed Dec 1, 2018
    llvm-svn: 348074
Commits on Nov 17, 2018
  1. [llvm-objdump] Print a blank row at the end of sections

    vgxbj committed Nov 17, 2018
    Summary:
    When using option `-x` (--all-headers), it will print `Sections`, `Symbol Table`, `Program Header` ...
    `Sections` and `Symbol Table` will be connected together.
    
    Before:
    ```
    Sections:
    Idx Name          Size      Address          Type
      0               00000000 0000000000000000
      ...
      29 .shstrtab     0000011a 0000000000000000
    SYMBOL TABLE:
      ...
    ```
    
    After:
    ```
    Sections:
    Idx Name          Size      Address          Type
      0               00000000 0000000000000000
      ...
      29 .shstrtab     0000011a 0000000000000000
    
    SYMBOL TABLE:
      ...
    ```
    
    Reviewers: Higuoxing
    
    Reviewed By: Higuoxing
    
    Subscribers: llvm-commits, jhenderson
    
    Differential Revision: https://reviews.llvm.org/D54665
    
    llvm-svn: 347135
Commits on Nov 15, 2018
  1. [llvm-objdump] Use `auto` declaration in typecasting

    vgxbj committed Nov 15, 2018
    Summary:
    According to `MaskRay`, use `auto` for type inference, according to coding standards.
    Delete some comments, because these comments can be easily inferred from codes.
    
    Reviewers: jhenderson, MaskRay
    
    Reviewed By: jhenderson
    
    Subscribers: llvm-commits
    
    Differential Revision: https://reviews.llvm.org/D54573
    
    llvm-svn: 346946
  2. [commit-test] Add blank line for test/tools/llvm-objdump/symbol-table…

    vgxbj committed Nov 15, 2018
    …-elf.test
    
    Summary: Test commit
    
    Reviewers: Higuoxing
    
    Reviewed By: Higuoxing
    
    Subscribers: llvm-commits, Higuoxing
    
    Differential Revision: https://reviews.llvm.org/D54562
    
    llvm-svn: 346924
Older
You can’t perform that action at this time.