This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: shared object of CDL.
>>>>> "Andrew" == Andrew Lunn <andrew.lunn@ascom.ch> writes:
>> > Why is the question that springs to mind.
>> >
>> > Is there something going on with symbol tables? Has the
>> > shared library version been stripped where as the static
>> > version still has all the symbols?
>>
>> No, I stripped both of them. The static version links all
>> functions defined in libcdl.a, while the shared versios has
>> only tables of libcdl.
Andrew> You should look at the options you are passing to gcc and
Andrew> the linker. It should be possible to get the linker to
Andrew> throw away all the symbols that are not needed. I think
Andrew> -ffunction-sections -fdata-sections is what you need.
Combining -ffunction-sections/-fdata-sections and any form of dynamic
loading is generally a bad idea, it is far too easy to accidentally
get rid of code or information that the loading program expects to be
present. Officially it is unsupported: from the ld documentation "This
option is not compatible with `-r', nor should it be used with dynamic
linking."
Bart
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss