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

#pragma option -Z and #pragma compat 1 difference. #253

Closed
Y-Less opened this issue Jan 10, 2018 · 1 comment
Closed

#pragma option -Z and #pragma compat 1 difference. #253

Y-Less opened this issue Jan 10, 2018 · 1 comment

Comments

@Y-Less
Copy link
Member

Y-Less commented Jan 10, 2018

The former doesn't work, the latter does. Apparently using the former can give unfound file errors. I guess the problem is that the latter does:

sym=findconst("__compat",NULL);
assert(sym!=NULL);
sym->addr=pc_compat;

While the former doesn't. Probably just requires:

sym=findconst("__compat",NULL);
if (sym)
    sym->addr=pc_compat;

Under -Z, which would account for both cases - before it is created and after.

@Y-Less
Copy link
Member Author

Y-Less commented Jan 10, 2018

I said "doesn't work" and "gives unfound file errors". However, I think the problem actually stems from YSI looking for __compat for certain actions. Because it is not set, the code tries to do the wrong thing for the current compile mode. So the problem is half compiler (not setting __compat) and half YSI (depending on the correct value).

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

No branches or pull requests

2 participants