From: Luke D. <cod...@ho...> - 2003-06-21 12:08:13
|
>From: RomikB <ro...@ma...> >Reply-To: RomikB <ro...@ma...> >To: min...@li... >Subject: Re[2]: [Mingw-users] Dll Loading >Date: Fri, 20 Jun 2003 15:21:51 +0300 > >Hello Luke, > >Friday, June 20, 2003, 1:02:46 PM, you wrote: > >LD> First please see this page about what information you need to include >when >LD> reporting a problem: http://www.mingw.org/bugs.shtml >LD> I can't reproduce this with a trivial example so you'll need to provide >a >LD> small test case, and you can try comparing the DLLs yourself to find >out >LD> what is changing with "-s", for example with this command: >LD> objdump -p file.dll > >In gcc manual(linker options): >-s >Remove all symbol table and relocation information from the executable. > >In ld manual: >-s, -strip-all >Omit all symbol information from the output file. > >So when i using -s I lost relocation information, but .reloc section >still exist, and dll's that have the same or crossing base addreses >can't be loaded succesfuly. I've read a lot of replies to your problem that don't make a lot of sense to me, so I'll just try to explain what I think: 1. When I create a trivial test DLL, using "-s" or "-Wl,-s" or "strip" on it does NOT remove base relocations. The fact that the .reloc section exists and that "objdump -p" lists the base relocations shows that this is the case. This is why I asked for a test case, because we can't reproduce your problem otherwise. 2. The question of whether it is safe to remove relocations from executables (.exe) is meaningless because executables don't have relocations! :-). They are loaded at their default base address and have no .reloc section. 3. If it can be shown that either 1 or 2 above are not true then it is a bug. It should always be safe to strip a DLL, and the documentation above about removing relocation information should not apply to DLL base relocations. Luke > >GCC 3.2.3 >MinGW 2.0.0-3 >GNU ld version 2.13.90 20030104 > > >> I create a set of dll's. > >> I use: > >> gcc -O2 -shared -Wl,-s -o file.dll file.c > >> But when i try load them, I get an error: not all dll's can be loaded. > >> When I remove -Wl,-s switch a problem disapear, but dll's now it TOOO > >> BIG. > >> Please answer how can I reduse the size of dll. > >> (I don't need debug or symbol info. Need only relocation info.) > >-- >Best regards, > RomikB mailto:ro...@ma... _________________________________________________________________ Get mobile Hotmail. Go to http://ninemsn.com.au/mobilecentral/signup.asp |