Docs for --unresolved-symbols unclear?
Vladimir Prus
ghost@cs.msu.su
Fri Dec 5 06:39:00 GMT 2003
Hi Nick,
>> I get only warning, and binary crashes at runtime. So, it seems that
>> defaultб б valueб ofб --unresolved-symblsб isб notб "ignore-all".
>
>> Is it so, and what's the real default value, or I'm missing
>> something?
>
> No - the default was changed in order to allow autoconf to work, but
> the documentation was not updated to match this change.б б Iб amб goingб to
> apply the patch below to fix the documentation.
Thanks for explaining this!
> *************** for which shared libraries are supported
> *** 985,992 ****
>б б б defaultб onб suchб platforms.б б Theб differentб variantsб ofб thisб optionб are
>б б б forб compatibilityб withб variousб systems.б б Youб mayб useб thisб option
>б б б multipleб timesб onб theб commandб line:б itб affectsб libraryб searchingб for
> ! @option{-l} options which follow it.б б This
> ! option also implies @option{--unresolved-symbols=ignore-all}.
>б б б
>б б б @kindexб -Bgroup
>б б б @itemб -Bgroup
> --- 985,991 ----
>б б б defaultб onб suchб platforms.б б Theб differentб variantsб ofб thisб optionб are
>б б б forб compatibilityб withб variousб systems.б б Youб mayб useб thisб option
>б б б multipleб timesб onб theб commandб line:б itб affectsб libraryб searchingб for
> ! @option{-l} options which follow it.
Now, I'm at loss again. This change removes stagement that -Bdynamic implies
--unresolved-symbols=ignore-all. But when I try my test case:
б б б б voidб foo();
б б б б intб main()
б б б б {
б б б б б б б б foo();
б б б б }
with
б б g++б a.cppб -Wl,-Bdynamic
I get:
a.cpp:6:2: warning: no newline at end of file
/tmp/ccaT8qMm.o(.text+0x11): In function `main':
: warning: undefined reference to `foo()'
That is, I get warning, not error. Without, -Bdynamic, I get error, as
expected. I'm using binutils 2.14.90.0.6-3 on Debian, so it might not be
the most current version. OTOH, Changelog does not mention any significant
changes to -Bdynamic.
- Volodya
More information about the Binutils
mailing list