[PATCH] D114186: [lld][CMake] Add LLD_DEFAULT_NOSTART_STOP_GC

Ed Maste via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 08:22:18 PST 2021


emaste added a comment.

> FreeBSD used an ancient version of GNU ld (2.17.50, from mid 2000s) until we migrated all target architectures to lld. That old ld defaults to no GC start/stop, we have been using that behaviour for decades.

Oh, wait - I'm mistaken here, the old base system use was without `--gc-sections`.

Using the example from GNU ld PR 19167 <https://sourceware.org/bugzilla/show_bug.cgi?id=19167> on FreeBSD 11 with GNU ld 2.17.50:

  % ld --gc-sections -o x a.o b.o
  a.o: In function `_start':
  (.text+0x0): undefined reference to `__start__foo'


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114186/new/

https://reviews.llvm.org/D114186



More information about the llvm-commits mailing list