linking OsmocomBB firmware fails on binutils 2.27
On modern binutils (tested with 2.27), we get linker errors like this:
arm-none-eabi-ld: section .text.exceptions VMA [000000000080001c,0000000000800037] overlaps section .compal.reservedram VMA [0000000000800000,00000000008000fe] arm-none-eabi-ld: section .text.exceptions VMA [000000000080001c,0000000000800037] overlaps section .compal.loader VMA [0000000000800000,00000000008000ff]
It seems related to the changes introduced by https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a87dd97a2098b7e18ff2574a4e81ae521ef7e6f2 (see also https://sourceware.org/bugzilla/show_bug.cgi?id=18452) where not only LMA but also VMA areas are now checked for overlaps.
#2 Updated by libomnomnom-dev 3 months ago
I'm facing the same, with binutils 2.28. Is there any known workaround?
One can resolve the issue straight ahead by editing `ram.lds` and other LD segment definition files lying under `osmocom-bb/src/target/firmware/board/` so that the memory segments don't overlap, yet point to the same addresses as before.
While I did manage to make the linker happy, the resulting binaries don't make the phone appear alive (yet?).