i#1979 Mac64: small app support on Mojave #3833
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes several issues to get small 64-bit apps to run on Mojave:
Fixes library discovery problems with the dyld shared cache.
On Mojave, SYS_shared_region_check_np returns the whole lib region,
while the existing code assumed its return value was the shared
__LINKEDIT segment.
Demotes a DOCHECK at level 1 in check_thread_vm_area to 3 for
Mac64 as it shows up as a large performance hit apparently due
to slow memory queries.
Segment fixes: fixes two issues hit due to DR and lib segments being
equal: a bb building assert for -no_mangle_app_seg and a
dr_insert_get_seg_base() assert.
Attempts to reduce overhead in memquery_from_os() where it needs extra
iterations to find the surrounding bounds of a free area, by walking
backward instead of starting from 0.
Uses SYS_stat64 and SYS_fstat64 for stat syscalls.
Basic signal support:
future work.
including the style.
Issue: #1979