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;