Appending gcc linker script causes error

I'm trying to work out why this happens, but am not a great expert at linker scripts.  Currently, we use arm-none-eabi to build our projects (and cmake) to great effect.  I'm currently working on a project that uses an nRF52840 and AHB devices RAM4, RAM5, RAM6, and RAM7 for static buffers.  We start with RAM4 (0x20008000) because the smartdevice uses through 0x20004000 + some, which makes RAM4 the first available AHB device.  We need four such blocks, and we don't want to use RAM8 because it's much larger than we need.

The issue is that .bss runs into RAM4 (and RAM5, actually), so we would ideally like to move it to start at 0x20010000, but to do so we need to customize the content from nrf_common.ld.  If we simply copy that file into our linker script at the point where it is normally included, and make no other changes to a working build, we get the following error:

Fullscreen
1
2
/usr/arm-none-eabi/bin/ld: section .nrf_queue LMA [000000000004a548,000000000004a55b] overlaps section .data LMA [000000000004a548,000000000004b66f]
collect2: error: ld returned 1 exit status
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The remainder of the linker script is the same as the one provided in the ble_app_buttonless_dfu example (in armgcc), but with the memory sizes appropriate to our project:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Linker script to configure memory regions. */
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)
MEMORY
{
FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xc9000
RAM (rwx) : ORIGIN = 0x20005000, LENGTH = 0x3b000
uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
}
SECTIONS
{
. = ALIGN(4);
.uicr_bootloader_start_address :
{
PROVIDE(__start_uicr_bootloader_start_address = .);
KEEP(*(SORT(.uicr_bootloader_start_address*)))
PROVIDE(__stop_uicr_bootloader_start_address = .);
} > uicr_bootloader_start_address
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

If I comment in the INCLUDE and remove everything after it, I get a clean compile and a good binary.