From d11bc6edb4bdccc13d67b62c79c2d6c293a69a4b Mon Sep 17 00:00:00 2001 From: Mariusz Skamra Date: Wed, 30 Aug 2023 14:47:33 +0200 Subject: [PATCH] tests: Bluetooth: ascs: Fix linker warning This fixes linker warning caused by invalid bonding of linker scripts provided by multiple "-T" options. mock-sections.ld contains output sections did you forget -T Signed-off-by: Mariusz Skamra --- tests/bluetooth/audio/mocks/CMakeLists.txt | 4 +--- tests/bluetooth/audio/mocks/mock-sections.ld | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/bluetooth/audio/mocks/CMakeLists.txt b/tests/bluetooth/audio/mocks/CMakeLists.txt index b6138761581..10d37d191bf 100644 --- a/tests/bluetooth/audio/mocks/CMakeLists.txt +++ b/tests/bluetooth/audio/mocks/CMakeLists.txt @@ -30,7 +30,5 @@ target_include_directories(mocks PUBLIC add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/host host_mocks) target_link_libraries(mocks PRIVATE test_interface host_mocks) - target_link_options(mocks PUBLIC - -T "${ZEPHYR_BASE}/tests/bluetooth/audio/mocks/mock-sections.ld" -) + "SHELL:-T ${ZEPHYR_BASE}/tests/bluetooth/audio/mocks/mock-sections.ld") diff --git a/tests/bluetooth/audio/mocks/mock-sections.ld b/tests/bluetooth/audio/mocks/mock-sections.ld index e00c81047e7..99bad548aac 100644 --- a/tests/bluetooth/audio/mocks/mock-sections.ld +++ b/tests/bluetooth/audio/mocks/mock-sections.ld @@ -6,16 +6,17 @@ SECTIONS { - bt_conn_cb_area : ALIGN(4) + data.bt_conn_cb_area : ALIGN(4) { _bt_conn_cb_list_start = .; KEEP(*(SORT_BY_NAME(._bt_conn_cb.static.*))) _bt_conn_cb_list_end = .; } - bt_gatt_service_static_area : ALIGN(4) + data.bt_gatt_service_static_area : ALIGN(4) { _bt_gatt_service_static_list_start = .; KEEP(*(SORT_BY_NAME(._bt_gatt_service_static.static.*))) _bt_gatt_service_static_list_end = .; } } +INSERT AFTER .data;