Open-source way to set LAA bit on an executable
Konstantin Kharlamov
hi-angel@yandex.ru
Tue Feb 2 06:33:10 GMT 2021
On Mon, 2021-02-01 at 18:43 +0000, Hannes Domani via Binutils wrote:
> 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
Oh, this is cool! Are you going to send it to the list for inclusion?
More information about the Binutils
mailing list