Wrong crt0 pulled in with official arm-gcc toolchain?
Richard Earnshaw (lists)
Richard.Earnshaw@arm.com
Thu Jan 16 14:44:50 GMT 2025
On 15/01/2025 18:42, Sven Pauli wrote:
> Hi,
>
>
> I've just recently upgraded my (fairly old) toolchain to the latest
> official one (arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi)
> distributed by ARM.
>
>
> It seems that for some reason now when linking it started to pull in
> `crt0.o` from gcc (./lib/gcc/arm-none-eabi/...) instead of the one that
> comes with newlib (./arm-none-eabi/lib/...), and that in turn expects
> various symbols to be defined, mainly related to transactional memory
> (__TMC_END__ from .text.register_tm_clones and so on).
>
>
> I haven't changed anything since the upgrade; command lines are pretty
> basic, just `-mcpu=cortex-m3` and `--specs=nano.specs --
> specs=nosys.specs`. I'm using the `crti/crto/crtbegin/crtend` that
> belongs to gcc (so I don't want to use `nostartfiles`) and I intended to
> use the `crt0` from newlib, and I provide my own startup that relocates
> the data segment and then defers to `_start`.
>
>
> Now I am a bit clueless where to adjust something. Is this a gcc or a
> newlib or a user issue..?
>
>
> Many thanks and kind regards,
>
> Sven
>
Can you double-check your installation, please? I can only find
./arm-none-eabi/lib/thumb/v7-a+simd/softfp/crt0.o
./arm-none-eabi/lib/thumb/v7-a+simd/hard/crt0.o
./arm-none-eabi/lib/thumb/v7e-m+dp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v7e-m+dp/hard/crt0.o
./arm-none-eabi/lib/thumb/v8-a+simd/softfp/crt0.o
./arm-none-eabi/lib/thumb/v8-a+simd/hard/crt0.o
./arm-none-eabi/lib/thumb/v7+fp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v7+fp/hard/crt0.o
./arm-none-eabi/lib/thumb/v8-m.main/nofp/crt0.o
./arm-none-eabi/lib/thumb/v7e-m/nofp/crt0.o
./arm-none-eabi/lib/thumb/v7-a+fp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v7-a+fp/hard/crt0.o
./arm-none-eabi/lib/thumb/v8.1-m.main+pacbti/bp/nofp/crt0.o
./arm-none-eabi/lib/thumb/v8-a/nofp/crt0.o
./arm-none-eabi/lib/thumb/v8.1-m.main+mve/hard/crt0.o
./arm-none-eabi/lib/thumb/v8-m.main+dp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v8-m.main+dp/hard/crt0.o
./arm-none-eabi/lib/thumb/v8.1-m.main+pacbti+mve/bp/hard/crt0.o
./arm-none-eabi/lib/thumb/v7ve+simd/softfp/crt0.o
./arm-none-eabi/lib/thumb/v7ve+simd/hard/crt0.o
./arm-none-eabi/lib/thumb/v8-m.main+fp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v8-m.main+fp/hard/crt0.o
./arm-none-eabi/lib/thumb/v6-m/nofp/crt0.o
./arm-none-eabi/lib/thumb/v7-a/nofp/crt0.o
./arm-none-eabi/lib/thumb/v7/nofp/crt0.o
./arm-none-eabi/lib/thumb/v7e-m+fp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o
./arm-none-eabi/lib/thumb/nofp/crt0.o
./arm-none-eabi/lib/thumb/v8.1-m.main+pacbti+fp/bp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v8.1-m.main+pacbti+fp/bp/hard/crt0.o
./arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o
./arm-none-eabi/lib/thumb/v8.1-m.main+pacbti+dp/bp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v8.1-m.main+pacbti+dp/bp/hard/crt0.o
./arm-none-eabi/lib/thumb/v8-m.base/nofp/crt0.o
./arm-none-eabi/lib/thumb/v7-r+fp.sp/softfp/crt0.o
./arm-none-eabi/lib/thumb/v7-r+fp.sp/hard/crt0.o
./arm-none-eabi/lib/arm/v5te/softfp/crt0.o
./arm-none-eabi/lib/arm/v5te/hard/crt0.o
./arm-none-eabi/lib/crt0.o
In the install image (x86 hosted).
So I wonder if you've picked up a crt0.o from somewhere else.
R.
More information about the Newlib
mailing list