This is the mail archive of the
mailing list for the binutils project.
Does objcopy --add-section .rsrc work for pei-i386?
- From: Vladimir Simonov <sv at sw dot ru>
- To: binutils at sourceware dot org
- Date: Fri, 03 Feb 2012 17:18:03 +0300
- Subject: Does objcopy --add-section .rsrc work for pei-i386?
Trying to add .rsrc section to pei-i386 dll (created by VS)
via "objcopy --add-section .rsrc=win32.res a.dll b.dll"
I get absolutely broken b.dll. According PEDUMP - .rsrc section
is on the head of sections list, EXPORTS and DEBUG entries are
empty, Resources are broken. "file win32.res" reports: MSVC .res.
I've tried to use win32.o in coff format - the same result.
Should objcopy work in such mode?
Does somebody know how to add win32 resources directly to PE
executable without link step?
As I see, standard way to add win32 resources to executable is
1. Creare rc file
2. Compile it to obj(mingw) or res(VS) file
3. Link the obj/res with other objs/libs by linker.
I'd like to avoid link step because the executable is language
neutral but res files are language-dependent. So multi-language
won't require re-link every executable.