This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is it possible to use a linker script to preserve unreferenced static C++ class instances defined in a static library?


On 16.05.13 15:51, Bob Mowry wrote:
>   Currently I'm using this linker script in an attempt to get the
> linker to keep all items in the .data segment:
> 
> SECTIONS
> {
>     .data :
>     {
>         KEEP(*(.data))
>     }
> }
> 
>   But it seems to have no impact.

Is it certain that the input section names match ".data"?
Something like .data1 or .data.suchlike would need .data* (or .data?),
and .data.*, respectively. The '*' outside the inner braces is only
saying "any filename".

Hopefully that takes us a step closer to the cause.

Erik

-- 
I really didn't foresee the Internet. But then, neither did the computer
industry. Not that that tells us very much, of course - the computer
industry didn't even foresee that the century was going to end.
                                                         - Douglas Adams


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]