[all-commits] [llvm/llvm-project] 980d28: ELFObjectWriter: Don't sort local symbols

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Feb 7 15:47:27 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 980d28d9556a671081719f82aea3de5db4328688
      https://github.com/llvm/llvm-project/commit/980d28d9556a671081719f82aea3de5db4328688
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-02-07 (Sun, 07 Feb 2021)

  Changed paths:
    M lld/test/ELF/aarch64-variant_pcs.s
    M lld/test/ELF/cgprofile-bad-clusters.s
    M lld/test/ELF/discard-none.s
    M lld/test/ELF/emit-relocs-discard-locals.s
    M lld/test/ELF/local.s
    M lld/test/ELF/merge-string.s
    M lld/test/ELF/mips-64-disp.s
    M lld/test/ELF/mips-got-page.s
    M lld/test/ELF/mips-gprel32-relocs.s
    M lld/test/ELF/ppc64-pcrel-call-to-pcrel.s
    M lld/test/ELF/ppc64-pcrel-call-to-toc.s
    M lld/test/ELF/ppc64-tls-pcrel-ld.s
    M lld/test/ELF/ppc64-tls-pcrel-le.s
    M lld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s
    M lld/test/ELF/relocatable-discard-locals.s
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/test/MC/AArch64/mapping-across-sections.s
    M llvm/test/MC/AMDGPU/hsa-gfx10-v3.s
    M llvm/test/MC/AMDGPU/hsa-gfx10.s
    M llvm/test/MC/AMDGPU/hsa-v3.s
    M llvm/test/MC/AMDGPU/hsa.s
    M llvm/test/MC/ARM/arm-elf-symver.s
    M llvm/test/MC/ARM/data-in-code.ll
    M llvm/test/MC/ARM/mapping-within-section.s
    M llvm/test/MC/ARM/mappingsymbols.s
    M llvm/test/MC/ARM/multi-section-mapping.s
    M llvm/test/MC/ARM/relocated-mapping.s
    M llvm/test/MC/ARM/thumb-types.s
    M llvm/test/MC/ARM/thumb_set.s
    M llvm/test/MC/ELF/addrsig.s
    M llvm/test/MC/ELF/alias.s
    M llvm/test/MC/ELF/cgprofile.s
    M llvm/test/MC/ELF/ifunc-alias.s
    M llvm/test/MC/ELF/many-sections-2.s
    M llvm/test/MC/ELF/reloc-same-name-section.s
    M llvm/test/MC/ELF/section-sym.s
    M llvm/test/MC/ELF/symver.s
    M llvm/test/MC/ELF/type-propagate.s
    M llvm/test/MC/ELF/weakref.s
    M llvm/test/MC/Hexagon/lcomm.s
    M llvm/test/MC/Mips/micromips-label-test.s

  Log Message:
  -----------
  ELFObjectWriter: Don't sort local symbols

GNU as does not sort local symbols. This has several advantages:

* The .symtab order is roughly the symbol occurrence order.
* The closest preceding STT_SECTION symbol is the definition of a local symbol.
* The closest preceding STT_FILE symbol is the defining file of a local symbol, if there are multiple default-version .file directives. (Not implemented in MC.)




More information about the All-commits mailing list