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]

Does objcopy --add-section .rsrc work for pei-i386?


Hi all,

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.

So questions:
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.

Regards
Vladimir Simonov


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