This patch contains thre3 changes:
- Add GetAliasRegionStart which will dispatch to either 0 or kAliasRegionStart depending on if aliasing mode is enabled.
- Wrap instances of kAliasRegionStart so it's not emitted when aliasing mode is disabled.
- Move kAliasRegionStart out of hwasan_linux.cpp so other platforms can reuse it if other platforms want to define a non-zero alias start.
For now, aliasing mode is not supported on fuchsia, so this takes care of "not using what we don't use" while making it easier to use if we do support it in the future.
why here and not in linux where it's used?
I assumed you can make it in linux file
static uptr kAliasRegionStart;