[PATCH] D46628: [ELF] Add --strip-debug-non-line option

Brian Gesiak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 22:16:50 PDT 2018


modocache created this revision.
modocache added a reviewer: ruiu.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.

When I attempted to use lld as a drop-in replacement for gold on a
project I work on, I encountered an error: "unknown argument:
--strip-debug-non-line". This option was added to gold in May 2008 (see:
https://sourceware.org/ml/binutils/2008-05/msg00232.html). Apparently it
"strips debugging information other than what is needed to map program
counter values to line numbers."

As a rough first pass at implementing this option, exclude all debug
sections that are not needed to map counter values to line numbers.

Test Plan: `check-lld`


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46628

Files:
  ELF/Config.h
  ELF/Driver.cpp
  ELF/Options.td
  docs/ld.lld.1
  test/ELF/strip-debug-non-line.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46628.145863.patch
Type: text/x-patch
Size: 3980 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180509/f1e470de/attachment.bin>


More information about the llvm-commits mailing list