Recognize -Wl,-Bsymbolic
Without -Bsymbolic, a symbol/function in a *.so can be overridden by a symbol/function in the main module. That is the default search order, but not supported by tcc. With -Bsymbolic, the linker tries to resolve a symbol/function in the current module first. The loader in tcc implements this search order. We do not distinguish -Bsymbolic and -Bsymbolic-function -- By by ... Detlef
This commit is contained in:
committed by
Detlef Riekenberg
parent
5caf6235cf
commit
2650584ac4
2
tcc.c
2
tcc.c
@ -386,6 +386,8 @@ static int parse_args(TCCState *s, int argc, char **argv)
|
||||
if (strstart(optarg, "-Ttext,", &p)) {
|
||||
s->text_addr = strtoul(p, NULL, 16);
|
||||
s->has_text_addr = 1;
|
||||
} else if (strstart(optarg, "-Bsymbolic", &p)) {
|
||||
s->symbolic = TRUE;
|
||||
} else if (strstart(optarg, "--section-alignment,", &p)) {
|
||||
s->section_align = strtoul(p, NULL, 16);
|
||||
} else if (strstart(optarg, "--image-base,", &p)) {
|
||||
|
||||
Reference in New Issue
Block a user