@@ -3169,9 +3169,11 @@ ST_FUNC int tcc_load_object_file(TCCState *s1,
31693169 || 0 == strncmp (sh_name , ".stab" , 5 )) {
31703170 if (!s1 -> do_debug || seencompressed )
31713171 continue ;
3172+ #if !(TARGETOS_OpenBSD || TARGETOS_FreeBSD || TARGETOS_NetBSD )
31723173 } else if (0 == strncmp (sh_name , ".eh_frame" , 9 )) {
31733174 if (NULL == eh_frame_section )
31743175 continue ;
3176+ #endif
31753177 } else
31763178 if (sh -> sh_type != SHT_PROGBITS &&
31773179 sh -> sh_type != SHT_NOTE &&
@@ -3181,6 +3183,9 @@ ST_FUNC int tcc_load_object_file(TCCState *s1,
31813183 sh -> sh_type != SHT_FINI_ARRAY
31823184#ifdef TCC_ARM_EABI
31833185 && sh -> sh_type != SHT_ARM_EXIDX
3186+ #endif
3187+ #if TARGETOS_OpenBSD || TARGETOS_FreeBSD || TARGETOS_NetBSD
3188+ && sh -> sh_type != SHT_X86_64_UNWIND
31843189#endif
31853190 )
31863191 continue ;
@@ -3195,7 +3200,7 @@ ST_FUNC int tcc_load_object_file(TCCState *s1,
31953200 if (strcmp (s -> name , sh_name ))
31963201 continue ;
31973202 if (sh -> sh_type != s -> sh_type
3198- && s != eh_frame_section
3203+ && strcmp ( s -> name , ".eh_frame" )
31993204 ) {
32003205 tcc_error_noabort ("section type conflict: %s %02x <> %02x" , s -> name , sh -> sh_type , s -> sh_type );
32013206 goto the_end ;
0 commit comments