In article <20131105144023.gc17...@mail.duskware.de>, Martin Husemann <mar...@duskware.de> wrote: >-=-=-=-=-=- > >Hey folks, > >I would like to change the current (mostly) compile time decision >wether we will use top-down VA layout for userland processes to a >runtime check. > >This allows emulations to disable it, and also allows MD code to recognize >binaries not suitable for topdown VM layout and give those binaries the >old layout. > >The latter point is what I actually need: on sparc64 we have compiled most >code in the "medlow" code model, which does not allow big addresses. I am >about to commit changes that switch this default and properly mark new >binaries. To still allow running old binaries, I need something like the >attached patch. > >The patch is mostly straight forward: I define a new flag EXEC_TOPDOWN_VM, >initialized by default according to __USING_TOPDOWN_VM, but overridable >by a MD function. This way the exec_package carries over the information, >wether we will use topdown-vm for the to-be-loaded binary. > >Most other changes are mechanical, like pass through this information through >a few uvm layers. > >For architectures already using topdown-VM, no change is intended. > >Comments?
I don't like the !!(expr) syntax, I'd prefer to hide the ugliness in a macro that does (expr != 0) christos