[all-commits] [llvm/llvm-project] 67d828: [Object][NFC] Factor out computeHeadersSize.

jacekcw via All-commits all-commits at lists.llvm.org
Thu Mar 23 04:44:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67d828fb2c0168e1fe0f1caeba8fc7dc47b0c3ff
      https://github.com/llvm/llvm-project/commit/67d828fb2c0168e1fe0f1caeba8fc7dc47b0c3ff
  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M llvm/lib/Object/ArchiveWriter.cpp

  Log Message:
  -----------
  [Object][NFC] Factor out computeHeadersSize.

In preparation for COFF archives support.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D143537


  Commit: 257dc54be2d292acec2d6b609ebb0a4e424c9e30
      https://github.com/llvm/llvm-project/commit/257dc54be2d292acec2d6b609ebb0a4e424c9e30
  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M llvm/lib/Object/ArchiveWriter.cpp

  Log Message:
  -----------
  [Object][NFC] Don't insert string table into object members vector.

Having string table in members vector does not fit later patches in
this series. Symbol map needs to refer to objects' offsets, but string
table should not be referenced. Also for ARM64EC, the new <ECSYMBOLS>
table is inserted after string table.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D143538


  Commit: 4fcbf3842007569880fa916831efefda6b1bd032
      https://github.com/llvm/llvm-project/commit/4fcbf3842007569880fa916831efefda6b1bd032
  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M llvm/lib/Object/ArchiveWriter.cpp
    M llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
    M llvm/test/tools/llvm-lib/duplicate.test

  Log Message:
  -----------
  [llvm-lib] Use COFF archive format in llvm-lib (other archive tools don't use this format).

We currently just use GNU format for llvm-lib. This mostly works, but
ARM64EC needs an additional section that does not really fit GNU format.
This patch implements writing in COFF format (as in, it's what archive
reader considers as K_COFF). This mostly requires symbol emitting symbol
map. Note that, just like in case of MSVC, symbols are de-duplicated in
both usual symbol table and the new symbol map.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D143540


  Commit: a5988034a44d039f95db3067e4ad0dfeeca155c3
      https://github.com/llvm/llvm-project/commit/a5988034a44d039f95db3067e4ad0dfeeca155c3
  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M lld/COFF/Writer.cpp
    M lld/test/COFF/arm-thumb-thunks-multipass.s
    M lld/test/COFF/arm64-import2.test
    A lld/test/COFF/gaps-fill.test

  Log Message:
  -----------
  [lld] Fill .text section gaps with INT3 only on x86 targets.

It doesn't make sense on ARM and using default 0 fill is compatible
with MSVC.

(It's more noticeable ARM64EC targets, where additional padding mixed
with alignment is used for entry thunk association, so there are more
gaps).

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D145962


Compare: https://github.com/llvm/llvm-project/compare/f44c7dec67fe...a5988034a44d


More information about the All-commits mailing list