Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f7b65d1f authored by Frederick Mayle's avatar Frederick Mayle
Browse files

libbinder: support exporting fewer symbols

This commit explicitly marks symbols in the code with default visibility
if they should be part of the libbinder ABI. Later, we'll set the
default symbol visibility to hidden and so any symbols not explicitly
marked as exported will be hidden.

We are still overexporting symbols a bit. When `LIBBINDER_EXPORTED` is
applied to a class, it exports all of that class's symbols. I've tried
to only export class members, but in a few cases it didn't seem worth
the trouble, e.g. where all the members need to be exported.

Additionally, we are exporting some symbols only needed by binder test
binaries. Since those tests run against the standard libbinder.so, we
need to include the symbols as part of the ABI.

On aarch64, this reduces the size of libbinder_on_trusty_mock.so by
10.7% and libbinder.so by 7.5%, primarily in the .text, .dynstr, and
.dynsym sections (but none of this takes effect until we actually
enabled it in a later commit).

Bug: 338458975
Test: TH
Change-Id: Idc348c2b12124a8bbcebeea49920267a995367b6
parent 91f0294c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment