Open-source way to set LAA bit on an executable

Hannes Domani ssbssa@yahoo.de
Mon Feb 1 18:43:46 GMT 2021


 Am Montag, 1. Februar 2021, 00:34:43 MEZ hat Konstantin Kharlamov <hi-angel@yandex.ru> Folgendes geschrieben:

> On Sat, 2021-01-30 at 16:14 +0300, Konstantin Kharlamov wrote:
>
> > I'm in search for open-source way to modify a LAA bit (Large Address Aware) on
> > PE executables. Background is that there are 32-bit games (such as the first
> > "Mass Effect") that are limited to lower 2G of address space, and they're
> > crashing on people upon using performance-enhancing WINE addons, like Gallium
> > Nine or DXVK, due to slightly increased memory consumption. So, they need to
> > have LAA bit set.¹
> >
> > Currently, the way everyone recommends is `editbin.exe`,² but not only it is
> > proprietary, it is also Windows-only. So I'd prefer to abstain of recommending
> > it unless there's really no other way. I also tried reverse-engeneering
> > framework radare, but long story short, it didn't work out.³
>
>
> FTR, now I have a way to do it with radare (although it requires using raw
> offsets manually, but otherwise it works). Still curious though, how would
> one modify fields of what objdump calls "private headers" with objcopy.

Out of curiosity, I tried to implement --large-address-aware in objcopy.
Seemed simple enough, the patch is attached.


Hannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objcopy-large-address-aware.patch
Type: application/octet-stream
Size: 2062 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20210201/af765565/attachment.obj>


More information about the Binutils mailing list