Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add weak memcpy et al (take 2) #15

Closed
wants to merge 1 commit into from
Closed

add weak memcpy et al (take 2) #15

wants to merge 1 commit into from

Conversation

japaric
Copy link
Member

@japaric japaric commented Aug 8, 2016

@japaric
Copy link
Member Author

japaric commented Aug 8, 2016

Splitting rlibc into its own crate yields correct __aeabi_* intrinsics

00000000 <__aeabi_memcpy>:
   0:   eafffffe        b       0 <memcpy>

But using this crate still generates a recursive bomb.

@Amanieu
Copy link
Member

Amanieu commented Aug 8, 2016

So is the problem inside the rlibc crate? Is the memcpy function calling itself?

@japaric
Copy link
Member Author

japaric commented Aug 8, 2016

The rlibc disassembly loosk correct.

Interestingly, disabling LTO on this branch doesn't fix the infinite recursion.

@Amanieu
Copy link
Member

Amanieu commented Aug 8, 2016

memcmp should be added as well since it is called by libcore.

@@ -9,6 +9,8 @@
#[cfg(test)]
extern crate core;

extern crate rlibc;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think an extern crate is necessary here since you're getting the symbols using extern "C".

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.

2 participants