ignore OUTPUT_FORMAT and TARGET ld script commands (fixes Redhat >= 7 static link problems)
This commit is contained in:
parent
214ccccea7
commit
066d5e7a84
1 changed files with 15 additions and 0 deletions
15
tccelf.c
15
tccelf.c
|
@ -1954,6 +1954,21 @@ static int tcc_load_ldscript(TCCState *s1)
|
||||||
t = ld_next(s1, filename, sizeof(filename));
|
t = ld_next(s1, filename, sizeof(filename));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (!strcmp(cmd, "OUTPUT_FORMAT") ||
|
||||||
|
!strcmp(cmd, "TARGET")) {
|
||||||
|
/* ignore some commands */
|
||||||
|
t = ld_next(s1, cmd, sizeof(cmd));
|
||||||
|
if (t != '(')
|
||||||
|
expect("(");
|
||||||
|
for(;;) {
|
||||||
|
t = ld_next(s1, filename, sizeof(filename));
|
||||||
|
if (t == LD_TOK_EOF) {
|
||||||
|
error_noabort("unexpected end of file");
|
||||||
|
return -1;
|
||||||
|
} else if (t == ')') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue