[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30142] New: PE .rsrc section is generated as writable
From: |
pali at kernel dot org |
Subject: |
[Bug binutils/30142] New: PE .rsrc section is generated as writable |
Date: |
Sun, 19 Feb 2023 16:16:28 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30142
Bug ID: 30142
Summary: PE .rsrc section is generated as writable
Product: binutils
Version: 2.39
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: pali at kernel dot org
Target Milestone: ---
PE resources in .rsrc section should be read-only but LD/windres generates them
as read-write. Simple test case:
$ cat empty.c
void empty(void) {}
$ cat test-rsrc.rc
1 VERSIONINFO
BEGIN
END
$ x86_64-w64-mingw32-windres --input-format=rc --output-format=coff
--input=test-rsrc.rc --output=test-rsrc.o
$ x86_64-w64-mingw32-gcc -nostartfiles -e empty empty.c test-rsrc.o -o
test-rsrc.exe
$ readpe test-rsrc.exe | grep -A 11 'Name:\s*\.rsrc'
export directory not found
Name: .rsrc
Virtual Address: 0x6000
Physical Address: 0xb8
Size: 0x200 (512 bytes)
Pointer To Data: 0xe00
Relocations: 0
Characteristics: 0xc0000040
Characteristic Names
IMAGE_SCN_CNT_INITIALIZED_DATA
IMAGE_SCN_MEM_READ
IMAGE_SCN_MEM_WRITE
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/30142] New: PE .rsrc section is generated as writable,
pali at kernel dot org <=