Clay McClure via llvm-dev
2018-Jan-24 19:28 UTC
[llvm-dev] Should llvm-nm classify Mach-O __DATA, __common symbols as BSS?
Hello LLVM-Devs, Perhaps a pedantic question, but I'm wondering how __DATA,__common and __DATA,__bss symbols differ, and whether llvm-nm ought not classify the former as type "B" as it does the latter: $ cat bss.c int i; static int si __attribute__((used)); $ clang -fno-common -c bss.c $ nm bss.o 0000000000000000 S _i 0000000000000004 b _si $ nm -m bss.o 0000000000000000 (__DATA,__common) external _i 0000000000000004 (__DATA,__bss) non-external [no dead strip] _si My (somewhat limited) understanding of linking and loading is that both of these symbols will be zero-filled at run-time by the operating system or program loader. To my mind, "B (bss section symbol)" conveys that better than "S (symbol in a section other than those above"). The relevant commit appears to be r211321 — I'm happy to submit a patch, if appropriate. Cheers, Clay
Reasonably Related Threads
- [LLVMdev] Add Support For .bss Named Section Directive For Darwin Targets
- [LLVMdev] Add Support For .bss Named Section Directive For Darwin Targets
- [LLVMdev] Add Support For .bss Named Section Directive For Darwin Targets
- [LLVMdev] Add Support For .bss Named Section Directive For Darwin Targets
- [LLVMdev] Add Support For .bss Named Section Directive For Darwin Targets