... not just on the BSDs. Sometimes e.g. .note.ABI-tag is allocated and other sections might contain relocations referring to symbols in them. TCC doesn't do any special processing to them, like merging or somesuch, it just pastes them all together in normal link-editing behaviour. (Seen on a recent openSUSE with glibc 2.32, when the crt1.o file contains debug information)
Unified · Split
| @@ -2781,8 +2781,8 @@ ST_FUNC int tcc_load_object_file(TCCState *s1, · 2780 unmodified lines | ||
| 2781 | 2781 | #endif |
| 2782 | 2782 | #if TARGETOS_OpenBSD || TARGETOS_FreeBSD || TARGETOS_NetBSD |
| 2783 | 2783 | sh->sh_type != SHT_X86_64_UNWIND && |
| 2784 | − sh->sh_type != SHT_NOTE && | |
| 2785 | 2784 | #endif |
| 2785 | + sh->sh_type != SHT_NOTE && | |
| 2786 | 2786 | sh->sh_type != SHT_NOBITS && |
| 2787 | 2787 | sh->sh_type != SHT_PREINIT_ARRAY && |
| 2788 | 2788 | sh->sh_type != SHT_INIT_ARRAY && |