Following up on my own response, I just ran the script from the original message on my development machine (sorry, I should have done that before):
% sh foo /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/amd64/libgcc.a Your copy of /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/amd64/libgcc.a does have the problem being demonstrated by this test. The .debug_str section in at least one member, _absvdi2.o, has nonzero flags, so it will not merge with object files you compile with gcc, which have no bits set in sh_flags. See the dumps below for proof. ========================================================================= Partial elfdump of libgcc.a member _absvdi2.o showing .debug_str section flags. Notice in this dump that there is a .debug_str section with nonzero sh_flags: Section Header[18]: sh_name: .debug_str sh_addr: 0 sh_flags: [ SHF_MERGE SHF_STRINGS ] ========================================================================= Partial elfdump of object file test.o, showing .debug_str section flags. Notice in this dump that there is a .debug_str section with sh_flags = 0: Section Header[19]: sh_name: .debug_str sh_addr: 0 sh_flags: 0 ========================================================================= Partial elfdump of linked a.out , showing debug_str sections and flags. Notice that there are two debug_str sections, in violation of DWARF rules. Section Header[35]: sh_name: .debug_str sh_addr: 0 sh_flags: 0 There's only 1 .debug_str section... - Ali