[all-commits] [llvm/llvm-project] aaf3a8: [LLD][COFF] Add -build-id flag to generate .buildi...

Zequan Wu via All-commits all-commits at lists.llvm.org
Tue Dec 5 11:57:58 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aaf3a8ded47121c8ec8136f97a7a2c39112b3e59
      https://github.com/llvm/llvm-project/commit/aaf3a8ded47121c8ec8136f97a7a2c39112b3e59
  Author: Zequan Wu <zequanwu at google.com>
  Date:   2023-12-05 (Tue, 05 Dec 2023)

  Changed paths:
    M lld/COFF/Config.h
    M lld/COFF/Driver.cpp
    M lld/COFF/Options.td
    M lld/COFF/Writer.cpp
    M lld/MinGW/Driver.cpp
    M lld/MinGW/Options.td
    M lld/test/COFF/debug-reloc.s
    M lld/test/COFF/rsds.test
    M lld/test/MinGW/driver.test

  Log Message:
  -----------
  [LLD][COFF] Add -build-id flag to generate .buildid section. (#71433)

[RFC](https://discourse.llvm.org/t/rfc-add-build-id-flag-to-lld-link/74661)

Before, lld-link only generate the debug directory containing guid when
generating PDB with the hash of PDB content.

With this change, lld-link can generate the debug directory when only
`/build-id` is given:
1. If generating PDB, `/build-id` is ignored. Same behaviour as before.
2. Not generating PDB, using hash of the binary.
   - Not under MinGW, the debug directory is still in `.rdata` section.
   - Under MinGW, place the debug directory into new `.buildid` section.




More information about the All-commits mailing list