I am writing a bare metal application and am running into an issue that I believe is related to the linker.
Issue:
IRQ handler is not being linked from the static library provided. The IRQ is declared outside of the library with __attribute__ ((weak, alias("defaultInterrupt")))
. When this attribute is provided, the IRQ is not linked. When the attribute is removed, the IRQ is linked.
This post: Linking with static library not equivalent to linking with its objects indicates that the issue may be with the linker not finding the strong declaration because it stops searching, but does not suggest a fix.
Question:
Is there any way to ensure that the linker will find the strongly declared function?
Environment:
I am using arm-none-eabi-ld distributed by ARM, found here: arm-none-eabi
Already Attempted:
Re-ordering the libraries passed to the linker