From: Tom Rini <trini@konsulko.com>
To: Johannes Krottmayer <johannes@krotti42.com>
Cc: u-boot@lists.denx.de
Subject: Re: ARM - Linking issue with binutils 2.44 (dangerous relocation: unsupported relocation)
Date: Mon, 5 May 2025 14:07:52 -0600 [thread overview]
Message-ID: <20250505200752.GL5430@bill-the-cat> (raw)
In-Reply-To: <640da044-55d0-4491-afea-3e9d9dc0179e@krotti42.com>
[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]
On Sun, May 04, 2025 at 03:12:07PM +0000, Johannes Krottmayer wrote:
> Hello U-Boot list members!
>
> There exist an issue with the newly GNU binutils version 2.44 when
> trying to build U-Boot at link time.
>
> Error output:
> $ make stm32h743-eval_defconfig
> $ make
> [...]
> LD u-boot
> arm-none-eabi-ld.bfd: warning: -z norelro ignored
> arm-none-eabi-ld.bfd: arch/arm/cpu/armv7m/start.o(c_runtime_cpu_setup):
> Unknown destination type (ARM/Thumb) in arch/arm/lib/crt0.o
> arch/arm/lib/crt0.o: in function `_main':
> /home/jk/Projects/U-Boot/src/arch/arm/lib/crt0.S:170:(.text+0x44):
> dangerous relocation: unsupported relocation
> make[1]: *** [/home/jk/Projects/U-Boot/src/Makefile:1824: u-boot] Error 1
> make[1]: Leaving directory '/home/jk/Projects/U-Boot/build'
> make: *** [Makefile:177: sub-make] Error 2
> $
>
> I have tried to fixed it with success. Simply added the assembler
> directive ".type c_runtime_cpu_setup, %function" after
> ".globl c_runtime_cpu_setup". under the path:
>
> arch/arm/cpu/armv7m/start.S
>
> The binutils patch with cause this building error is explained
> at least in the following commit in the binutils git repo:
> 31ed3a9d691493486f6e32357d89a55229dbdc0a
>
> Extract from the log:
>
> "This patch emits an error instead, and warns in some other
> cases, to encourage users to add the missing '.type foo,%function'
> directive."
>
> But I don't know if this only exist on ARMv7-M.
Thanks for the report. Would you mind submitting a patch to at least fix
that case? It'll help in the future with other reports.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2025-05-05 20:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-04 15:12 ARM - Linking issue with binutils 2.44 (dangerous relocation: unsupported relocation) Johannes Krottmayer
2025-05-05 20:07 ` Tom Rini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250505200752.GL5430@bill-the-cat \
--to=trini@konsulko.com \
--cc=johannes@krotti42.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox