Repository navigation
build: bionic offsets from a file, and attach as a feature - #417
Merged
Merged
Conversation
Per-thread attach needs bionic's internal layout, which the build measured from an AOSP tree at $AOSP, default /mnt/dev/aosp. A packager could neither supply the result nor turn the search off. Built where that tree is absent, a4l compiled attach out and said nothing; built where it is present by chance, a4l took a layout that nothing tied to the bionic it is staged with. - -Dbionic_offsets=<file>: use that header, made by tools/gen-bionic-offsets.sh where the AOSP tree is. Nothing on the build machine is read for the layout. - -Dbionic_attach: auto is the behavior until now; enabled stops the configure with the reason when no layout can be had; disabled looks at no tree. - The header names the architecture it was measured for. The option refuses one for the other architecture, one that says unavailable and one from an older script, and bionic_runtime.cpp refuses to compile against a mismatch. The other architecture's layout builds and then puts every TCB field in the wrong place. - The script takes --require and --disabled, and reads ACL_AOSP_ROOT when AOSP is unset. Tested, x86-64: - Default: attach available as before. Suite 134 of 134; no warning. - bionic_offsets=<x86-64 header> with no tree reachable: builds with attach available, and the script is not in the build. - A header for aarch64, one that says unavailable, one without the architecture line, a missing file, and a header with bionic_attach=disabled: configure errors that name the cause. - bionic_attach=enabled: a configure error with no tree; builds with one. bionic_attach=disabled: builds with attach compiled out. - bionic-offsets test, extended for --require, --disabled and the architecture line: passes. - The arm64 cross build compiles with its header's architecture line. Not run: an app on a build that took the layout from a file. The file is a copy of what the default path generates. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Per-thread attach needs bionic's internal layout, which the build measured from an AOSP tree at
$AOSP, default/mnt/dev/aosp. A packager could neither supply the result nor turn the search off. Built where that tree is absent, a4l compiled attach out and said nothing; built where it is present by chance, a4l took a layout that nothing tied to the bionic it is staged with.-Dbionic_offsets=<file>: use that header, made bytools/gen-bionic-offsets.shwhere the AOSP tree is. Nothing on the build machine is read for the layout.-Dbionic_attach:autois the behavior until now;enabledstops the configure with the reason when no layout can be had;disabledlooks at no tree.bionic_runtime.cpprefuses to compile against a mismatch. The other architecture's layout builds and then puts every TCB field in the wrong place.--requireand--disabled, and readsACL_AOSP_ROOTwhenAOSPis unset.Test status (x86-64)
bionic_offsets=<x86-64 header>, no tree reachablebionic_attach=disabledbionic_attach=enabled, no treebionic_attach=enabled, tree presentbionic_attach=disabledbionic-offsetstest, extendedNot run: an app on a build that took the layout from a file. The file is a copy of what the default path generates.