[En-Nut-Discussion] Problem with recent Arm-non-eabi-gcc and libs
Philipp Burch
phip at hb9etc.ch
Mon Feb 15 07:48:52 CET 2021
Hi Uwe!
On 02.02.21 17:28, Uwe Bonnes wrote:
> Hello,
>
> with recent gcc-arm-none-eabi-10-2020-q4-major and probably the other
> 2020 release, multiple problems happen in different incarnations
> depending on the link option
> - with only nut libc, binaries get substantial bigger
> - with nanolib, crashed like this appear:
> [...]
> etc.
>
> Do people have better experiences or hints for me?
>
> Thanks
>
My experiences are actually worse. I used GCC 7.3 (from 2018, the last
in gcc-arm-embedded debian package) so far and recently tried to update
to GCC 9.2 (the most recent in gcc-arm-none-eabi Ubuntu 20.04 package),
but this version even fails to link the application with multiple
definitions of OS functions:
------- 8< ------- 8< -------
arm-none-eabi-gcc main.o ... -Wl,--defsym=ccm_length=0
-Wl,--defsym=ram1_length=0 -Wl,--defsym=ram2_length=0 -mcpu=cortex-m4
-mthumb -D__CORTEX__ -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles
-L/.../ldscripts -Ttm4c1294ncpdt_flash.ld
-Wl,-Map=poleno18_control_board.map,--cref,--gc-sections
-L/.../nutbld/lib -Wl,--defsym=bootloader_offset=0x8000
-Wl,--start-group /.../nutbld/lib/nutinit.o -lnutpro -lnutnet -lnutfs
-lnutos -lnutgorp -lnutcrt -lnutdev -lnutarch -lm -lnutc
-Wl,--end-group -o poleno18_control_board.elf
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld:
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(lib_a-fflush.o):
in function `fflush':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+fp/hard/newlib/libc/stdio/../../../../../../../../newlib/libc/stdio/fflush.c:288:
multiple definition of `fflush';
/.../nutbld/lib/libnutcrt.a(fflush.o):fflush.c:(.text.fflush+0x0): first
defined here
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld:
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(lib_a-fclose.o):
in function `fclose':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m+fp/hard/newlib/libc/stdio/../../../../../../../../newlib/libc/stdio/fclose.c:125:
multiple definition of `fclose';
/.../nutbld/lib/libnutcrt.a(fclose.o):fclose.c:(.text.fclose+0x0): first
defined here
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: section
.ARM.exidx LMA [00000000000728a8,00000000000728af] overlaps section
.data LMA [00000000000728a8,0000000000073aff]
etc. for abort, _kill_r, _getpid_r, _fstat_r, ...
------- 8< ------- 8< -------
I haven't investigated any further yet, maybe it's just a simple option
that needs to be updated.
Did you need to change anything for the link stage itself to succeed?
Best regards,
Philipp
More information about the En-Nut-Discussion
mailing list