bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/18973] New: Support arbitrary DOS stubs in coff-go32-exe a


From: felix.von.s at posteo dot de
Subject: [Bug binutils/18973] New: Support arbitrary DOS stubs in coff-go32-exe and pei-* formats
Date: Wed, 16 Sep 2015 17:28:37 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18973

            Bug ID: 18973
           Summary: Support arbitrary DOS stubs in coff-go32-exe and pei-*
                    formats
           Product: binutils
           Version: 2.25
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: felix.von.s at posteo dot de
  Target Milestone: ---

The coff-go32-exe format reader supports only binaries with loader stubs
exactly 2048 bytes long. Binaries having stubs of any other size are not even
recognised by binutils. The built-in stub can be replaced only by setting an
undocumented environment variable while linking.

The pei-* reader recognises files with atypical DOS stubs, but objcopy replaces
them with its own built-in stub. The linker does not allow supplying another
DOS stub at all.

For go32 binaries, a custom stub can be used to embed a DPMI host in the
executable (CWSDSTUB), avoiding the need to distribute one separately. For PE
files, the feature can be used to create hybrid DOS/Windows binaries.

There should be an (emulation-specific? not sure how it works) option to embed
a custom stub in a go32 or PE binary while linking or objcopying.

(By the way, the built-in coff-go32-stub, which comes from DJGPP 2.0.2, may
need updating; the current 2.0.3 release contains some small improvements, and
a 2.0.5 release is underway. I'd consider splitting the built-in default stub
into a separate file to make it possible to update it without recompiling.)

-- 
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]