[PATCH] D21550: [lld] support --trace-symbol (alias -y) option

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 12:31:58 PDT 2016


On 21 June 2016 at 15:10, Shridhar Joshi via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> joshishr marked 9 inline comments as done.
> joshishr added a comment.
>
> In http://reviews.llvm.org/D21550#463069, @ruiu wrote:
>
>> Noticed that there's a better way to print out "definition of" messages.
>>
>> First, just add `traceUndefined` member function to ObjectFile and print out "reference to" messages if a given string is a member of Config->TraceSymbol.
>
>
> This will not address references from shared file.
>
>> And then define `traceSymbol` member function to SymbolTable. That function should iterate over all strings in Config->TraceSymbol. For each string, it looks up a defined symbol, and if it is defined, it prints out a "definition of" message. SymbolTable has scan* functions, and they are good examples how to do it.
>
>>
>
>> In this way, I think code for --trace-symbol would be separated nicely from the main code.
>
>
> This will not address symbol defined in different object files with strong and weak bindings and with different link order of those object files. It also will not address same symbol defined in archive and shared library with archive library being first in link order.

Can you add one of these as a testcase?

Cheers,
Rafael


More information about the llvm-commits mailing list