History

OpenBSD: Fix crt startup names - WIP

Christian Jullien committed 5 years ago

Commit dfe031c1 parent 4e12c2a2 files · +10 −2Browse files

Unified · Split

2 files
  1. libtcc.c +5 −1
  2. tccelf.c +5 −1
libtcc.c+5−1
@@ -1091,7 +1091,11 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type) · 1090 unmodified lines
1091 /* add libc crt1/crti objects */1091 /* add libc crt1/crti objects */
1092 if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&1092 if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&
1093 !s->nostdlib) {1093 !s->nostdlib) {
1094#ifndef TCC_TARGET_MACHO1094#if defined(__OpenBSD__)
1095 if (output_type != TCC_OUTPUT_DLL)
1096 tcc_add_crt(s, "crt0.o");
1097 tcc_add_crt(s, "crtbegin.o");
1098#elif !defined(TCC_TARGET_MACHO)
1095 /* Mach-O with LC_MAIN doesn't need any crt startup code. */1099 /* Mach-O with LC_MAIN doesn't need any crt startup code. */
1096 if (output_type != TCC_OUTPUT_DLL)1100 if (output_type != TCC_OUTPUT_DLL)
1097 tcc_add_crt(s, "crt1.o");1101 tcc_add_crt(s, "crt1.o");
tccelf.c+5−1
@@ -1429,7 +1429,11 @@ ST_FUNC void tcc_add_runtime(TCCState *s1) · 1428 unmodified lines
1429#endif1429#endif
1430 if (strlen(TCC_LIBTCC1) > 0)1430 if (strlen(TCC_LIBTCC1) > 0)
1431 tcc_add_support(s1, TCC_LIBTCC1);1431 tcc_add_support(s1, TCC_LIBTCC1);
1432#ifndef TCC_TARGET_MACHO1432#if defined(__OpenBSD__)
1433 /* add crt end if not memory output */
1434 if (s1->output_type != TCC_OUTPUT_MEMORY)
1435 tcc_add_crt(s1, "crtend.o");
1436#elif !defined(TCC_TARGET_MACHO)
1433 /* add crt end if not memory output */1437 /* add crt end if not memory output */
1434 if (s1->output_type != TCC_OUTPUT_MEMORY)1438 if (s1->output_type != TCC_OUTPUT_MEMORY)
1435 tcc_add_crt(s1, "crtn.o");1439 tcc_add_crt(s1, "crtn.o");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t