History

Ignore as_needed in ld_add_file_list

After the change to DT_NEEDED I get warnings for some functions. The reason is that libc.so on my machine contains: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) Before the change to DT_NEEDED we solved the symbols because the /lib64/libc.so.6 file has as DT_NEEDED set for ld-linux-x86-64.so.2 The above AS_NEEDED section was not followed so symbols in this file gives a warning. Currently fixed by including AS_NEEDED files.

herman ten brugge committed 3 years ago

Commit ded713e1 parent 0f29dbc1 file · +3 −2Browse files

Unified · Split

tccelf.c+3−2
@@ -3877,8 +3877,9 @@ static int ld_add_file_list(TCCState *s1, const char *cmd, int as_needed) · 3876 unmodified lines
38773877 if (ret)
38783878 goto lib_parse_error;
38793879 } else {
3880− /* TODO: Implement AS_NEEDED support. Ignore it for now */
3881− if (!as_needed) {
3880+ /* TODO: Implement AS_NEEDED support. */
3881+ /* DT_NEEDED is not used any more so ignore as_needed */
3882+ if (1 || !as_needed) {
38823883 ret = ld_add_file(s1, filename);
38833884 if (ret)
38843885 goto lib_parse_error;

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