Skip to content

Commit bb94995

Browse files
committed
zephyr: add linker section for version.cc
This change adds the linker section .unstable_id to the Zephyr build and avoids an "orphaned" section warning. Signed-off-by: Yuval Peress <[email protected]> Change-Id: I439cb5b67d2e9fea99ab1939d4c78e438caa15b1
1 parent 33fbc56 commit bb94995

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

platform/zephyr/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ if(CONFIG_CHRE)
5555
"${CHRE_DIR}/platform/shared/system_time.cc"
5656
"${CHRE_DIR}/util/dynamic_vector_base.cc"
5757
)
58+
zephyr_linker_sources(SECTIONS linker_chre.ld)
5859

5960
# Optional audio support
6061
if(CONFIG_CHRE_AUDIO_SUPPORT_ENABLED)

platform/zephyr/linker_chre.ld

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (C) 2022 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
SECTION_DATA_PROLOGUE(_CHRE_SECTION,,)
18+
{
19+
KEEP(*(".unstable_id"));
20+
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
21+

0 commit comments

Comments
 (0)