From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23500 invoked by alias); 3 Feb 2012 13:21:31 -0000 Received: (qmail 23488 invoked by uid 22791); 3 Feb 2012 13:21:29 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,TW_BJ,TW_JC X-Spam-Check-By: sourceware.org Received: from mx1.apical.co.uk (HELO mail.tech.apical.co.uk) (141.0.38.114) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Feb 2012 13:21:14 +0000 Received: from [10.250.144.85] (23.nat.acronis.net [91.195.22.23]) (authenticated bits=0) by mail.tech.apical.co.uk (8.14.4/8.14.4) with ESMTP id q13DLB1O002169 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 3 Feb 2012 13:21:13 GMT Message-ID: <4F2BEC9B.3010803@sw.ru> Date: Fri, 03 Feb 2012 13:21:00 -0000 From: Vladimir Simonov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Thunderbird/3.0.4 MIME-Version: 1.0 To: binutils@sourceware.org Subject: Does objcopy --add-section .rsrc work for pei-i386? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00025.txt.bz2 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