已合并
Add version scripts to limit exported symbols of libbase.z.so and libconfiguration.z.so #871
m0_65533854创建于 19 天前
Add version scripts to limit exported symbols of libbase.z.so and libconfiguration.z.so #871
已合并
共 5 个文件变更+154-0
| @@ -61,6 +61,8 @@ ohos_shared_library("base") { | |||
| 61 | "ipc:ipc_core", | 61 | "ipc:ipc_core", |
| 62 | ] | 62 | ] |
| 63 | 63 | ||
| 64 | + version_script = "libbase.map" | ||
| 65 | + | ||
| 64 | subsystem_name = "ability" | 66 | subsystem_name = "ability" |
| 65 | innerapi_tags = [ | 67 | innerapi_tags = [ |
| 66 | "platformsdk", | 68 | "platformsdk", |
| @@ -106,6 +108,8 @@ ohos_shared_library("configuration") { | |||
| 106 | ] | 108 | ] |
| 107 | public_external_deps = [ "resource_management:global_resmgr" ] | 109 | public_external_deps = [ "resource_management:global_resmgr" ] |
| 108 | 110 | ||
| 111 | + version_script = "libconfiguration.map" | ||
| 112 | + | ||
| 109 | subsystem_name = "ability" | 113 | subsystem_name = "ability" |
| 110 | innerapi_tags = [ "platformsdk" ] | 114 | innerapi_tags = [ "platformsdk" ] |
| 111 | part_name = "ability_base" | 115 | part_name = "ability_base" |
| @@ -141,6 +145,8 @@ ohos_shared_library("zuri") { | |||
| 141 | "hilog:libhilog", | 145 | "hilog:libhilog", |
| 142 | ] | 146 | ] |
| 143 | 147 | ||
| 148 | + version_script = "libzuri.map" | ||
| 149 | + | ||
| 144 | subsystem_name = "ability" | 150 | subsystem_name = "ability" |
| 145 | innerapi_tags = [ | 151 | innerapi_tags = [ |
| 146 | "platformsdk", | 152 | "platformsdk", |
| @@ -225,6 +231,7 @@ ohos_shared_library("want") { | |||
| 225 | ":want_exceptions_config", | 231 | ":want_exceptions_config", |
| 226 | ] | 232 | ] |
| 227 | public_configs += [ ":want_public_config" ] | 233 | public_configs += [ ":want_public_config" ] |
| 234 | + version_script = "libwant.map" | ||
| 228 | subsystem_name = "ability" | 235 | subsystem_name = "ability" |
| 229 | innerapi_tags = [ | 236 | innerapi_tags = [ |
| 230 | "platformsdk", | 237 | "platformsdk", |
| @@ -0,0 +1,56 @@ | |||
| 1 | +# Copyright (c) 2026 Huawei Device Co., Ltd. | ||
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 3 | +# you may not use this file except in compliance with the License. | ||
| 4 | +# You may obtain a copy of the License at | ||
| 5 | +# | ||
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 7 | +# | ||
| 8 | +# Unless required by applicable law or agreed to in writing, software | ||
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 11 | +# See the License for the specific language governing permissions and | ||
| 12 | +# limitations under the License. | ||
| 13 | + | ||
| 14 | +{ | ||
| 15 | + global: | ||
| 16 | + extern "C++" { | ||
| 17 | + /* interfaces defined in base_interfaces.h and base_obj.h */ | ||
| 18 | + *IInterface*; | ||
| 19 | + *IObject*; | ||
| 20 | + *IBoolean*; | ||
| 21 | + *IChar*; | ||
| 22 | + *IByte*; | ||
| 23 | + *IShort*; | ||
| 24 | + *IInteger*; | ||
| 25 | + *ILong*; | ||
| 26 | + *IFloat*; | ||
| 27 | + *IDouble*; | ||
| 28 | + *IString*; | ||
| 29 | + *IArray*; | ||
| 30 | + *IPacMap*; | ||
| 31 | + *IUserObject*; | ||
| 32 | + *IRemoteObjectWrap*; | ||
| 33 | + *IWeakReference*; | ||
| 34 | + *IWeakReferenceSource*; | ||
| 35 | + /* implementation classes */ | ||
| 36 | + *Object*; | ||
| 37 | + *Boolean*; | ||
| 38 | + *Byte*; | ||
| 39 | + *Short*; | ||
| 40 | + *Integer*; | ||
| 41 | + *Long*; | ||
| 42 | + *Float*; | ||
| 43 | + *Double*; | ||
| 44 | + *String*; | ||
| 45 | + *Char*; | ||
| 46 | + *UserObject*; | ||
| 47 | + *UserObjectBase*; | ||
| 48 | + *UserObjectBaseLoader*; | ||
| 49 | + *RemoteObjectWrap*; | ||
| 50 | + /* global constants */ | ||
| 51 | + *g_IID_*; | ||
| 52 | + *Uuid*; | ||
| 53 | + }; | ||
| 54 | + local: | ||
| 55 | + *; | ||
| 56 | +}; | ||
| @@ -0,0 +1,28 @@ | |||
| 1 | +# Copyright (c) 2026 Huawei Device Co., Ltd. | ||
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 3 | +# you may not use this file except in compliance with the License. | ||
| 4 | +# You may obtain a copy of the License at | ||
| 5 | +# | ||
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 7 | +# | ||
| 8 | +# Unless required by applicable law or agreed to in writing, software | ||
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 11 | +# See the License for the specific language governing permissions and | ||
| 12 | +# limitations under the License. | ||
| 13 | + | ||
| 14 | +{ | ||
| 15 | + global: | ||
| 16 | + extern "C++" { | ||
| 17 | + /* class defined in configuration.h */ | ||
| 18 | + *Configuration*; | ||
| 19 | + /* conversion helpers defined in configuration_convertor.h */ | ||
| 20 | + *Convert*; | ||
| 21 | + *Get*Str*; | ||
| 22 | + *DarkMode_*; | ||
| 23 | + *Direction_*; | ||
| 24 | + *ScreenDensity_*; | ||
| 25 | + }; | ||
| 26 | + local: | ||
| 27 | + *; | ||
| 28 | +}; | ||
| @@ -0,0 +1,41 @@ | |||
| 1 | +# Copyright (c) 2026 Huawei Device Co., Ltd. | ||
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 3 | +# you may not use this file except in compliance with the License. | ||
| 4 | +# You may obtain a copy of the License at | ||
| 5 | +# | ||
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 7 | +# | ||
| 8 | +# Unless required by applicable law or agreed to in writing, software | ||
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 11 | +# See the License for the specific language governing permissions and | ||
| 12 | +# limitations under the License. | ||
| 13 | + | ||
| 14 | +{ | ||
| 15 | + global: | ||
| 16 | + extern "C++" { | ||
| 17 | + /* classes defined in want.h, want_params.h and want_params_wrapper.h */ | ||
| 18 | + *Want*; | ||
| 19 | + *UnsupportedData*; | ||
| 20 | + *g_IID_*; | ||
| 21 | + /* extern globals declared in want_params.h */ | ||
| 22 | + OHOS::AAFwk::FD; | ||
| 23 | + OHOS::AAFwk::REMOTE_OBJECT; | ||
| 24 | + OHOS::AAFwk::TYPE_PROPERTY; | ||
| 25 | + OHOS::AAFwk::VALUE_PROPERTY; | ||
| 26 | + /* class defined in array_wrapper.h */ | ||
| 27 | + *Array*; | ||
| 28 | + /* classes defined in operation.h and operation_builder.h */ | ||
| 29 | + *Operation*; | ||
| 30 | + /* class defined in patterns_matcher.h */ | ||
| 31 | + *PatternsMatcher*; | ||
| 32 | + /* class defined in skills.h */ | ||
| 33 | + *Skills*; | ||
| 34 | + /* classes defined in element_name.h, extra_params.h and pac_map.h */ | ||
| 35 | + *ElementName*; | ||
| 36 | + *ExtraParams*; | ||
| 37 | + *PacMap*; | ||
| 38 | + }; | ||
| 39 | + local: | ||
| 40 | + *; | ||
| 41 | +}; | ||
| @@ -0,0 +1,22 @@ | |||
| 1 | +# Copyright (c) 2026 Huawei Device Co., Ltd. | ||
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 3 | +# you may not use this file except in compliance with the License. | ||
| 4 | +# You may obtain a copy of the License at | ||
| 5 | +# | ||
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 7 | +# | ||
| 8 | +# Unless required by applicable law or agreed to in writing, software | ||
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 11 | +# See the License for the specific language governing permissions and | ||
| 12 | +# limitations under the License. | ||
| 13 | + | ||
| 14 | +{ | ||
| 15 | + global: | ||
| 16 | + extern "C++" { | ||
| 17 | + /* class defined in uri.h */ | ||
| 18 | + *Uri*; | ||
| 19 | + }; | ||
| 20 | + local: | ||
| 21 | + *; | ||
| 22 | +}; | ||