Re:ld should make '.rsrc' section read-only on win32

2005-12-07 Thread Danny Smith
Michael Popov wrote: I use mingw to produce win32 executables. It makes executable with '.rsrc' section flags 0xC040 which mean the section is writeable. According to Microsoft Portable Executable and Common Object File Format Specification (revision 6.0, Feb 1999): .rsrc section has

[Bug binutils/1991] objcopy does not update sh_link correctly

2005-12-07 Thread schwab at suse dot de
--- Additional Comments From schwab at suse dot de 2005-12-07 16:57 --- Created an attachment (id=783) -- (http://sourceware.org/bugzilla/attachment.cgi?id=783action=view) Output of objcopy -g -- http://sourceware.org/bugzilla/show_bug.cgi?id=1991 --- You are receiving this

[Bug binutils/1991] objcopy does not update sh_link correctly

2005-12-07 Thread schwab at suse dot de
--- Additional Comments From schwab at suse dot de 2005-12-07 16:57 --- Created an attachment (id=782) -- (http://sourceware.org/bugzilla/attachment.cgi?id=782action=view) Test object -- http://sourceware.org/bugzilla/show_bug.cgi?id=1991 --- You are receiving this mail

[Bug binutils/1991] New: objcopy does not update sh_link correctly

2005-12-07 Thread schwab at suse dot de
When stripping sections from an ELF object (eg. with objcopy -g) the resulting object has invalid sh_link fields for LINK ORDER sections. -- Summary: objcopy does not update sh_link correctly Product: binutils Version: 2.17 (HEAD) Status: NEW

[Bug binutils/1991] objcopy does not update sh_link correctly

2005-12-07 Thread schwab at suse dot de
--- Additional Comments From schwab at suse dot de 2005-12-07 17:07 --- The problem is that elf_discarded_section points to the input section, but this is not the linker. -- http://sourceware.org/bugzilla/show_bug.cgi?id=1991 --- You are receiving this mail because: ---

[Bug binutils/1991] objcopy does not update sh_link correctly

2005-12-07 Thread hjl at lucon dot org
--- Additional Comments From hjl at lucon dot org 2005-12-07 18:53 --- A patch is posted at http://sourceware.org/ml/binutils/2005-12/msg00058.html http://sourceware.org/ml/binutils/2005-12/msg00056.html is similar. But it doesn't handle a section is removed by -R. --

[Bug binutils/1991] objcopy does not update sh_link correctly

2005-12-07 Thread amodra at bigpond dot net dot au
--- Additional Comments From amodra at bigpond dot net dot au 2005-12-08 06:23 --- A similar problem can be seen on older dynamic objects. When stripping debug sections, section syms for the removed sections are not removed from .dynsym, because strip doesn't touch .dynsym. This