https://sourceware.org/bugzilla/show_bug.cgi?id=27047
Bug ID: 27047 Summary: bss section not supported for target z80-unknown-elf Product: binutils Version: 2.35.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: petemoore at gmx dot net Target Milestone: --- I believe that target z80-unknown-elf should support bss sections, but currently does not. Using https://ftpmirror.gnu.org/binutils/binutils-2.35.1.tar.gz: ./configure --target=z80-unknown-elf --disable-werror && make && sudo make install This successfully builds and installs `z80-unknown-elf-as` as well as some of the other binutils tools. However, the generated cross assembler does not support BSS sections: ``` pmoore@pmoore-laptop:~/git/bss-demo $ cat bss-demo.asm .bss pmoore@pmoore-laptop:~/git/bss-demo $ z80-unknown-elf-as bss-demo.asm bss-demo.asm: Assembler messages: bss-demo.asm:1: Error: unknown pseudo-op: `.bss' ``` Also with a custom bss section name, assembly fails: ``` pmoore@pmoore-laptop:~/git/bss-demo $ cat bss-demo.asm .section mybss,"b" pmoore@pmoore-laptop:~/git/bss-demo $ z80-unknown-elf-as bss-demo.asm bss-demo.asm: Assembler messages: bss-demo.asm:1: Fatal error: unrecognized .section attribute: want a,e,o,w,x,M,S,G,T or number pmoore@pmoore-laptop:~/git/bss-demo $ ``` However, even if I assemble and link assembly code with no bss section, a `__bss_start` section still appears in the generated elf file (without a `__bss_end__` section): ``` pmoore@pmoore-laptop:~/git/bss-demo $ cat bss-demo.asm .text .globl _start _start: nop pmoore@pmoore-laptop:~/git/bss-demo $ z80-unknown-elf-as -o bss-demo.o bss-demo.asm pmoore@pmoore-laptop:~/git/bss-demo $ z80-unknown-elf-ld bss-demo.o -o bss-demo.elf pmoore@pmoore-laptop:~/git/bss-demo $ z80-unknown-elf-readelf -s bss-demo.elf Symbol table '.symtab' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000100 0 SECTION LOCAL DEFAULT 1 2: 00000100 0 NOTYPE GLOBAL DEFAULT 1 _start 3: 00000101 0 NOTYPE GLOBAL DEFAULT 1 __bss_start 4: 00000101 0 NOTYPE GLOBAL DEFAULT 1 _edata 5: 00000101 0 NOTYPE GLOBAL DEFAULT 1 _end pmoore@pmoore-laptop:~/git/bss-demo $ ``` -- You are receiving this mail because: You are on the CC list for the bug.