| ... | @@ -251,7 +251,8 @@ fn initOutputSection(self: Object, elf_file: *Elf, shdr: ElfShdr) error{OutOfMem | ... | @@ -251,7 +251,8 @@ fn initOutputSection(self: Object, elf_file: *Elf, shdr: ElfShdr) error{OutOfMem |
| 251 | const name = blk: { | 251 | const name = blk: { |
| 252 | const name = self.getString(shdr.sh_name); | 252 | const name = self.getString(shdr.sh_name); |
| 253 | if (elf_file.base.isRelocatable()) break :blk name; | 253 | if (elf_file.base.isRelocatable()) break :blk name; |
| 254 | if (shdr.sh_flags & elf.SHF_MERGE != 0) break :blk name; | 254 | if (shdr.sh_flags & elf.SHF_MERGE != 0 and shdr.sh_flags & elf.SHF_STRINGS == 0) |
| | 255 | break :blk name; // TODO: consider dropping SHF_STRINGS once ICF is implemented |
| 255 | const sh_name_prefixes: []const [:0]const u8 = &.{ | 256 | const sh_name_prefixes: []const [:0]const u8 = &.{ |
| 256 | ".text", ".data.rel.ro", ".data", ".rodata", ".bss.rel.ro", ".bss", | 257 | ".text", ".data.rel.ro", ".data", ".rodata", ".bss.rel.ro", ".bss", |
| 257 | ".init_array", ".fini_array", ".tbss", ".tdata", ".gcc_except_table", ".ctors", | 258 | ".init_array", ".fini_array", ".tbss", ".tdata", ".gcc_except_table", ".ctors", |