This is the mail archive of the
mailing list for the binutils project.
errors converting PE executable to ELF using objcopy
- From: "David Hovemeyer" <david dot hovemeyer at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 3 Oct 2006 14:48:54 -0400
- Subject: errors converting PE executable to ELF using objcopy
Apologies if this is the wrong list and/or this is a stupid question.
I'm using binutils under cygwin to convert executables in Windows PECOFF
format to ELF. A while ago, this used to work. In a more recent version of
cygwin, I am getting some cryptic error messages. E.g.:
objcopy -O elf32-i386 user/shell.exe user/shell.exe
BFD: user/st2UTJnj: warning: allocated section `.text' not in segment
BFD: user/st2UTJnj: warning: allocated section `.data' not in segment
BFD: user/st2UTJnj: warning: allocated section `.rdata' not in segment
BFD: user/st2UTJnj: warning: allocated section `.idata' not in segment
The original user/shell.exe is a statically linked PECOFF executable file.
The resulting user/shell.exe is indeed an ELF file. However, its
program header contains no segments (which I guess is what the
warning messages are trying to warn me about).
Any ideas how to work around this problem would be greatly
ld --version says
GNU ld version 2.17.50 20060817
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.