Compatible with ld.bfd, gold, lld and mold. Also, document existing behaviour of LD_SO environment variable
Showing the changes to libtcc.c (1 of 5 files). Show all
Unified · Split
| @@ -1428,6 +1428,13 @@ static int tcc_set_linker(TCCState *s, const char *option) · 1427 unmodified lines | ||
| 1428 | 1428 | s->rdynamic = 1; |
| 1429 | 1429 | } else if (link_option(option, "rpath=", &p)) { |
| 1430 | 1430 | copy_linker_arg(&s->rpath, p, ':'); |
| 1431 | + } else if (link_option(option, "dynamic-linker=", &p) | |
| 1432 | + || link_option(option, "I=", &p)) { | |
| 1433 | + copy_linker_arg(&s->elfint, p, 0); | |
| 1434 | + } else if (strncmp("-I/", option, 3) == 0 | |
| 1435 | + || strncmp("-I.", option, 3) == 0) { | |
| 1436 | + p = option; | |
| 1437 | + copy_linker_arg(&s->elfint, option + 2, 0); | |
| 1431 | 1438 | } else if (link_option(option, "enable-new-dtags", &p)) { |
| 1432 | 1439 | s->enable_new_dtags = 1; |
| 1433 | 1440 | } else if (link_option(option, "section-alignment=", &p)) { |