https://sourceware.org/bugzilla/show_bug.cgi?id=17196
Bug ID: 17196
Summary: .rsrc section from archive members are ignored (all
Windows targets)
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: sashipa.ben at gmail dot com
Created attachment 7723
--> https://sourceware.org/bugzilla/attachment.cgi?id=7723&action=edit
simple example project
The .rsrc section is discarded by ld when it comes from an archive (.a) member
for all tested Windows targets (cygwin and mingw).
Included an example project:
$ make CC=i686-pc-mingw32 info
> i686-pc-mingw32-gcc -m32 -mwin32 -mwindows -c -o rsrcbug.o rsrcbug.c
> i686-pc-mingw32-windres -o resource.o resource.rc
> i686-pc-mingw32-gcc -m32 -mwin32 -mwindows -o rsrcbug-ok.exe rsrcbug.o
> resource.o
> i686-pc-mingw32-ar rc resource.a resource.o
> i686-pc-mingw32-ranlib resource.a
> i686-pc-mingw32-gcc -m32 -mwin32 -mwindows -o rsrcbug-failed.exe rsrcbug.o
> resource.a
>
> ************* rsrcbug-ok.exe
> Entry 2 0000b000 0000010c Resource Directory [.rsrc]
> 8 .rsrc 0000010c 0040b000 0040b000 00004800 2**2
> [ 50](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x0000003f rsrcbug.c
> [945](sec 9)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000 .rsrc
>
> ************* rsrcbug-failed.exe
> Entry 2 00000000 00000000 Resource Directory [.rsrc]
> [ 50](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x0000003f rsrcbug.c
>
> ************* resource.o
> Entry 2 00000000 00000000 Resource Directory [.rsrc]
> 0 .rsrc 0000010c 00000000 00000000 0000003c 2**2
> [ 0](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000 .rsrc
> RELOCATION RECORDS FOR [.rsrc]:
> 00000048 rva32 .rsrc
>
> ************* rsrcbug.o
> Entry 2 00000000 00000000 Resource Directory [.rsrc]
> [ 0](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x00000000 rsrcbug.c
>
> ************* resource.a
> Entry 2 00000000 00000000 Resource Directory [.rsrc]
> 0 .rsrc 0000010c 00000000 00000000 0000003c 2**2
> [ 0](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000 .rsrc
> RELOCATION RECORDS FOR [.rsrc]:
> 00000048 rva32 .rsrc
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils