What does the error mean?
The error was introduced after a: brew cask upgrade
The tools got updated from 7 to 9 -> arm-none-eabi-objdump --version
GNU objdump (GNU Tools for Arm Embedded Processors 9-2019-q4-major)
lib-h3 % arm-none-eabi-objdump -D lib_h3/libh3.a |
arm-none-eabi-c++filt > lib_h3/lib.list
arm-none-eabi-objdump: error: lib_h3/libh3.a(h3_codec.o)(.bss) section size (0x800c bytes) is larger than file size (0xde8 bytes)
arm-none-eabi-objdump: Reading section .bss failed because: memory exhausted
arm-none-eabi-objdump: error: lib_h3/libh3.a(udp.o)(.bss) section size (0x19934 bytes) is larger than file size (0xcfc bytes)
lib-h3 % echo $?
lib-h3 % ls -al build_h3/src/h3_codec.o
-rwx------ 1 arjanvanvught staff 3560 7 apr 17:50 build_h3/src/h3_codec.o
The file size of the object file is 3560 bytes which is the (0xde8 bytes) as mentioned in the error. Why would there be an error or even better; why would there be any relationship between the allocated bytes in .bss and the object file size?
Many thanks in advance, Arjan
As Arjan and a.surati mentioned this was a bug introduced upstream when adding some hardening features to BFD.
Essentially it's checking that the size in memory of a section isn't larger than it was on disk.
But this needs to exclude purely synthetic sections such as `.bss` etc.
I have fixed this in sourceware.org/.../show_bug.cgi and it was backported to 2.33 however the release was made after the fix.
The next release of the GNU toolchain will contain the fix.
View all questions in Arm Compilers forum