summaryrefslogtreecommitdiff
path: root/rust/binary.go
diff options
context:
space:
mode:
author Aleksei Vetrov <vvvvvv@google.com> 2023-08-23 10:06:35 +0000
committer Aleksei Vetrov <vvvvvv@google.com> 2023-09-13 15:39:58 +0000
commit262ed1a347533e894dabae96c3aff0ca3bcadfb2 (patch)
treecfb4cb9ae14c71a513efae647048a7114e4215c7 /rust/binary.go
parent4d730a8f142b67767617440f350bbc9322617645 (diff)
NDK library: collect NDK headers for ABI monitoring
Collect all NDK exported headers paths into a file that is used to detect public types that should be ABI monitored. Assume that we have the following code in exported header: typedef struct Context Context; typedef struct Output { ... } Output; void DoSomething(Context* ctx, Output* output); If none of public headers exported to end-users contain definition of "struct Context", then "struct Context" layout and members shouldn't be monitored. However we use DWARF information from a real library, which may have access to the definition of "string Context" from implementation headers, and it will leak to ABI. STG tool doesn't access source and header files, only DWARF information from compiled library. And the DWARF contains file name where a type is defined. So we need a rule to build a list of paths to public headers, so STG can distinguish private types from public and do not monitor private types that are not accessible to library users. Bug: 156513478 Test: development/tools/ndk/update_ndk_abi.sh with enabled canDumpAbi Change-Id: I9fa41e73450a41379638debb3dc56f421e0fb870 Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
Diffstat (limited to 'rust/binary.go')
0 files changed, 0 insertions, 0 deletions