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:
Detlef Riekenberg
2010-01-26 22:55:14 +01:00
committed by Detlef Riekenberg
parent 5caf6235cf
commit 2650584ac4
3 changed files with 9 additions and 0 deletions

3
tcc.h
View File

@ -445,6 +445,9 @@ struct TCCState {
/* if true, all symbols are exported */
int rdynamic;
/* if true, resolve symbols in the current module first (-Wl,Bsymbolic) */
int symbolic;
/* if true, only link in referenced objects from archive */
int alacarte_link;