errors converting PE executable to ELF using objcopy

David Hovemeyer david.hovemeyer@gmail.com
Tue Oct 3 18:49:00 GMT 2006


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
appreciated.

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.

Thanks,
Dave



More information about the Binutils mailing list