[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/24749] New: DLL redirect by ordinal only
From: |
error_man at 2die4 dot com |
Subject: |
[Bug ld/24749] New: DLL redirect by ordinal only |
Date: |
Sun, 30 Jun 2019 17:41:40 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24749
Bug ID: 24749
Summary: DLL redirect by ordinal only
Product: binutils
Version: 2.32
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: error_man at 2die4 dot com
Target Milestone: ---
https://stackoverflow.com/a/40978759
https://docs.microsoft.com/en-us/cpp/build/reference/exports?view=vs-2019
func2=other_module.#42
Requesting ability to redirect and import by ordinal, as shown above.
>From what I can tell so far, that is also the syntax used in the Export Adress
Table of the DLL, and the linker is over-validating input in DEF
files/.drective sections.
Thus, above syntax becomes invalid.
For testing, I used gcc 8.1.0 and binutils 2.30 from Mingw-w64, then I replaced
binutils manually with 2.32 in the end.
To prove my point, I have attached a testcase, and instructions for using
testcase:
1. Adjust path to compiler accordingly, in .bat file. Compile.
This will create the main .exe and a proxy dll containing invalid name
redirect.
2. Open test.dll in favorite hex editor, look up "ws2_32.Z11" from EAT and
replace with "ws2_32.#11".
3. Run main .exe in console. It should produce same result, through both direct
and proxy dll path.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/24749] New: DLL redirect by ordinal only,
error_man at 2die4 dot com <=