I noticed that someone wants to add --trace-all-symbols & --trace-symbols-from-file=<file> to ld.lld . They are variants that * trace all symbols * trace all symbols referenced or defined in a file I think --trace-symbols-from-file= is mildly useful. It can used to tell why an archive member is extracted. --trace-all-symbols can arguably be replaced with --trace-symbols-from-file=* so is not necessary.
Hi Fangrui, Does lld support the @<file> command line option ? ld.bfd supports this and it allows a user to place as many command line options as they like into <file>. So this is a more general solution to the problem and would work for options other than --trace-symbol as well. Cheers Nick
Yes, response files are accepted by many llvm-project tools. You reminded me that we can compose tools, e.g. ld.bfd @response.txt $(nm -Du usr/lib64/libc.so.6 | awk '{print "-y"substr($0,20)}') For object files, -D probably should be changed to -g. There is some flexibility composing can provide: nm -u can be changed to --defined-only to trace only defined symbols. So it is unnecessary for ld to support such file tracing features.
OK, closing