When dumping elf object's symbol table info, gnu-objdump will give:
SYMBOL TABLE: 0000000000001004 l F .text 0000000000000000 lfoo 0000000000001008 l O .text 0000000000000000 lbar 0000000000001004 g F .text 0000000000000000 foo 0000000000001008 g O .text 0000000000000000 bar
llvm-objdump will give:
0000000000001004 l F .text 00000000 lfoo 0000000000001008 l .text 00000000 lbar 0000000000001004 g F .text 00000000 foo 0000000000001008 g .text 00000000 bar
To pass llvm-objdump tests, I have to change some tests for Mach-O and Wasm which I am not so familiar with ... Is this ok to apply these changes? Because gnu-objdump display different info on Mach-O, compared with llvm-objdump
GNU objdump does not print the g flag because in binutils-gdb/bfd/syms.c:bfd_print_symbol_vandf, a common symbol is neither BSF_GLOBAL nor BSF_LOCAL (though a common symbol is usually STB_GLOBAL)... I consider that a quirk that we do not necessarily replicate the behavior. Also see some discussion in https://reviews.llvm.org/D53782