Dear Seyran,
"Seyran Avanesyan" <seyran.avanesyan@...> wrote on 04.10.2008
04:40:54:
> Hi All,
>
> I downloaded mingw-w64-bin_x86_64-mingw_20080724, which looks like
> compiled with debug info in it.
>
> I used strip.exe to reduce the size of .exe, .a and .o files, but it
> creates problems, linker can not find some symbols ...
> (In my case problems started after stripping libraries from
> x86_64-pc-mingw32 subfolder)
>
> Stripping with -g flag (remove only debug info) doesn't create problems,
> but stipping with --unneeded-only does.
Indeed is there a binutils bug about this. AFAIK there is already a patch
for it, but I am not sure if it is already applied.
> The question is if I strip all the libraries using -g flag, can I still
> strip all from .exe files and not break any functionality?
If you strip an .exe or .dll it works and won't break it. But there is at
the moment a problem with strip and base-relocations. If you build an
application with debugging symbols there are base-relocations present to
debugging sections. If you strip it then, those base-relocation are
remaining in the .reloc section, which can break it. Therefore I worked
around this by using the linker option -S for application generation. So
you strip debugging sections and the base-relocations are proper (If you
use gcc frontend to produce the application use --Wl,-S).
I hope I could help,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
|