[PATCH] D71803: [llvm-nm] Display STT_GNU_IFUNC as 'i'
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 2 10:37:09 PST 2020
MaskRay added a comment.
In D71803#1801067 <https://reviews.llvm.org/D71803#1801067>, @jhenderson wrote:
> I guess this isn't a real-world use case, but did you consider testing the interaction between STB_GNU_UNIQUE and STT_GNU_IFUNC? For all other types, the unique binding trumped the type, so seeing it different is a little odd.
`binutils-gdb/bfd/syms.c:bfd_decode_symclass`
if (symbol->flags & BSF_GNU_INDIRECT_FUNCTION)
return 'i';
if (symbol->flags & BSF_WEAK)
{
/* If weak, determine if it's specifically an object
or non-object weak. */
if (symbol->flags & BSF_OBJECT)
return 'V';
else
return 'W';
}
if (symbol->flags & BSF_GNU_UNIQUE)
return 'u';
Our rule matches GNU nm.
With regard to the interaction, `STB_GNU_UNIQUE` describes a property of a data symbol, while `STT_GNU_IFUNC` describes a property of a function symbol. So they cannot be mixed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71803/new/
https://reviews.llvm.org/D71803
More information about the llvm-commits
mailing list