Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented May 16, 2024

__udivdi3 isn't defined on LP64, don't export it.

Fixes: a306792 ("llext: add missing symbol exports")

__udivdi3 isn't defined on LP64, don't export it.

Fixes: a306792 ("llext: add missing symbol exports")
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh lyakh requested a review from singalsu as a code owner May 16, 2024 15:16
@lyakh lyakh mentioned this pull request May 16, 2024
@lyakh
Copy link
Collaborator Author

lyakh commented May 16, 2024

fixes #9129

@lyakh lyakh requested review from kv2019i and marc-hb May 16, 2024 15:26
@kv2019i kv2019i requested review from dbaluta and iuliana-prodan May 16, 2024 15:53
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.

@kv2019i
Copy link
Collaborator

kv2019i commented May 23, 2024

Ping? Would be nice to get this solved somehow as this is now showing up as a fail on every PR.

Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

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

Realize I never gave this a +1. Still think this would be better expressed with an expression that correctly detects more "platforms that don't have __udivdi3" than just that one NXP ARM core, but no reason not to merge.

@kv2019i
Copy link
Collaborator

kv2019i commented May 23, 2024

Thanks all, merging this to make PR CI pass. Please follow-up with improvements discussed.

@kv2019i kv2019i merged commit 852a664 into thesofproject:main May 23, 2024
@lyakh lyakh deleted the lp64 branch May 24, 2024 06:00
@marc-hb
Copy link
Collaborator

marc-hb commented Jul 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants