Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/math/numbers.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,7 @@ uint32_t crc32(uint32_t base, const void *data, uint32_t bytes)
return ~crc;
}

#if !CONFIG_SOC_MIMX9352_A55
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_SOC_MIMX9352_A55 != 64 bits

Copy link
Collaborator

@marc-hb marc-hb May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andyross can you help here?

EDIT: also tagging @keith-packard

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a libgcc symbol implementing a long divide (exactly which operation I'd have to look up, there are lots of variants). The bug here is presumably that some platforms (presumably only the NXP listed) are aarch64 devices with have a hardware divide, and so libgcc.a on those platforms doesn't include it. So trying to EXPORT_SYMBOL() ends up hitting a link failure trying to extract an address (because it doesn't exist). This seems not unreasonable.

I think if one wanted to nitpick:

  1. It should probably check something more generic, like CONFIG_64BIT, CONFIG_SOC_FAMILY_ARM64 (also X86_64 if we ever want to do 64 bit fuzzing!), or a GCC arch symbol like x86_64 or __ARM_ARCH_8A.
  2. It's not a SOF symbol to begin with , and this EXPORT_SYMBOL() belongs upstream in Zephyr llext somewhere.

uint64_t __udivdi3(uint64_t a, uint64_t b);
EXPORT_SYMBOL(__udivdi3);
#endif