[PATCH] D41277: Implement --just-symbols

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 18:22:14 PST 2017


I think I like this approach the best of the various ideas on how to
implement --just-symbols.

> +        StringRef SymName = CHECK(Sym.getName(StringTable), ObjName);
> +        Symtab->addAbsolute<ELFT>(SymName, STV_DEFAULT, STB_GLOBAL)->Value =
> +            Sym.st_value;

Since you have the visibility, why not copy it?

This patch allows --just-symbols to be a ET_DYN, ET_REL or ET_EXEC. Do
you need all 3? ET_REL in particular seems problematic since st_value
has a different meaning in relocatable files.

Thanks,
Rafael


More information about the llvm-commits mailing list