commit: 5501436a27246eef32d64e6514827421e06f6049 Author: Alexander Monakov <amonakov <AT> ispras <DOT> ru> AuthorDate: Tue Dec 16 08:20:08 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sat Dec 20 14:22:58 2025 +0000 URL: https://gitweb.gentoo.org/proj/blas-lapack-aux-wrapper.git/commit/?id=5501436a
allow skipped symbols to have unusual binding and visibility It seems GNU linker puts section symbols into .dynsym on AArch64. https://bugs.gentoo.org/967605 Symbol table '.dynsym' contains 22968 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000113980 0 SECTION LOCAL DEFAULT 9 .init 2: 00000000005e0000 0 SECTION LOCAL DEFAULT 21 .data 3: 0000000000000000 0 FUNC GLOBAL DEFAULT UND fputs <AT> GLIBC_2.17 (2) Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> list-elf-symbols.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/list-elf-symbols.c b/list-elf-symbols.c index 8dd1dad..44cb49f 100644 --- a/list-elf-symbols.c +++ b/list-elf-symbols.c @@ -55,14 +55,12 @@ int main(int argc, char **argv) int type = sym->st_info & 15; int bind = sym->st_info >> 4; int vis = sym->st_other & 3; - assert(bind == STB_GLOBAL || bind == STB_WEAK); - assert(vis == STV_DEFAULT || vis == STV_PROTECTED); if (!sym->st_value) continue; switch (type) { case STT_NOTYPE: case STT_SECTION: case STT_FILE: - break; + continue; case STT_OBJECT: case STT_TLS: fprintf(stderr, "TODO object %s [size %zd]\n", @@ -75,6 +73,8 @@ int main(int argc, char **argv) default: fprintf(stderr, "TODO symbol type %d\n", type); } + assert(bind == STB_GLOBAL || bind == STB_WEAK); + assert(vis == STV_DEFAULT || vis == STV_PROTECTED); } return 0;
