[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/16807] Bad behavior with resources of Windows applications with

From: kbrown at cornell dot edu
Subject: [Bug ld/16807] Bad behavior with resources of Windows applications with recent binutils upgrade on Cygwin64
Date: Thu, 29 May 2014 22:43:00 +0000


--- Comment #12 from Ken Brown <kbrown at cornell dot edu> ---
There are still problems with merged resources.  Namely, the resulting
executable after being stripped won't run, at least in some circumstances. 
Here's a simple test case on 64-bit Cygwin with the just-released binutils-
2.24.51-3.  It uses the attachments test.c, emacs.rc, and default-manifest.rc.

1. Compile the three source files:

  $ gcc -c test.c
  $ windres -o emacs.o emacs.rc
  $ windres -o default-manifest.o default-manifest.rc

2. Link them:

  $ gcc -o test test.o emacs.o default-manifest.o

3. Strip the resulting executable:

  $ strip test.exe

4. Try to run it:

  $ ./test.exe
  -bash: ./test.exe: cannot execute binary file

5. Observe that the resource section of the stripped executable is messed up:

  $ objdump -j .rsrc -s test.exe

  test.exe:     file format pei-x86-64

  Contents of section .rsrc:
  objdump: Reading section failed

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]