Commit d736a1b
authored
Add -Bsymbolic link option to avoid symbol interposition (#432)
### Motivation
There is a case that `libpulsar.so` could unexpectedly call functions from other dependencies.
For example, assuming the application depends on two libraries:
- `libpulsar.so`, which includes the symbols from `libcurl.a` 8.4.0
- `libfoo.so`, which includes the symbols from `libcurl.a` 7.82.0
If the link order is `libfoo.so` first, then the libcurl definitions from 7.82.0 will also be used by `libpulsar.so` and then the application might crash due to the incompatibility. This is an issue specifically with Linux ELF format.
### Modifications
Add the `-Wl,-Bsymbolic` link option for GCC.1 parent 8aab896 commit d736a1b
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| |||
0 commit comments