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

memset symbol #8

Open
Dragorn421 opened this issue Aug 25, 2021 · 0 comments
Open

memset symbol #8

Dragorn421 opened this issue Aug 25, 2021 · 0 comments

Comments

@Dragorn421
Copy link
Collaborator

I am only using mq debug so I didn't check other linker scripts but it would be a good idea to do so.

standard memset

(man memset): void *memset(void *s, int c, size_t n);

fills the first n bytes of the memory area pointed to by s with the constant byte c.

oot memset

there are two implementations:
void Lib_MemSet(u8* dest, size_t size, u8 val); (unlike the standard)
void* MemSet(void* dest, s32 val, s32 size); (like the standard)

in z64hdr

https://github.com/turpaan64/z64hdr/blob/ba7ce14e23c342a6336bb93a22d24e3ee0485d61/oot_mq_debug/syms.ld#L787-L788
https://github.com/turpaan64/z64hdr/blob/ba7ce14e23c342a6336bb93a22d24e3ee0485d61/oot_mq_debug/syms.ld#L2842

the addresses are accurate, but memset = Lib_MemSet is an issue since they use a different prototype
memset = MemSet would be better?

But I'm not sure why memset is even defined in the first place

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

No branches or pull requests

1 participant