_The Doctor__ Posted October 4, 2018 Share Posted October 4, 2018 so, it is definately an issue with the -O option as i encountered it again progresing my code. it seems to be fucking up my display list only. witout the -O all works well. again, i appologize for not being able to post the code..... in light of the impasse , help with code to find problem, can't show it because ip..... how about make a similar coding showing the F* up and submit that for study... no one can work on an intangible thing. In order to find out why or fix, examples are needed.... so I suggest create the F* up on purpose not using code no one can see.... then it may get resolution... 1 Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted October 5, 2018 Author Share Posted October 5, 2018 i understand what you guys are saying and you are correct. The intent of this thread was to alert all who use CC65, CL and the "-O" command line. i wanted to understand if any if the developers here have encountered the same. i guess the answer is no. and i guess this is only me. as for what the doctor said above, well, i will try to re-create the issue by creating a small program with my DL and maybe some variables defines. if i will succeed i will share the code here. hope i made sense.... Yaron 1 Quote Link to comment Share on other sites More sharing options...
mellis Posted October 5, 2018 Share Posted October 5, 2018 i understand what you guys are saying and you are correct. The intent of this thread was to alert all who use CC65, CL and the "-O" command line. i wanted to understand if any if the developers here have encountered the same. i guess the answer is no. and i guess this is only me. as for what the doctor said above, well, i will try to re-create the issue by creating a small program with my DL and maybe some variables defines. if i will succeed i will share the code here. hope i made sense.... Yaron I think it is more likely that a problem exists with your linker configuration than with the optimizer. If you optimize for speed, grow the executable, but then do not adjust the link strategy you will end up with a situation where smaller code works but speed-optimized larger code (with unrolled loops, etc.) will fail. 2 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted October 5, 2018 Share Posted October 5, 2018 My experience is that it's the linker will do it's job and fail where the code/data intended to fit within a segment exceeds the reserved size, so I don't see the using the optimizer of not affects this? Quote Link to comment Share on other sites More sharing options...
mellis Posted October 6, 2018 Share Posted October 6, 2018 My experience is that it's the linker will do it's job and fail where the code/data intended to fit within a segment exceeds the reserved size, so I don't see the using the optimizer of not affects this? I was simply pointing out that the linker could correctly assemble all of the object files into an executable that extends into RAM area that the program is incorrectly assuming is usable. Why would the program be addressing this RAM directly? I assume this is a possibility because the author wrote earlier that he is not inclined to learn the linker configuration process. If the linker is unaware that the program is addressing this memory, it cannot do its job of keeping code out of the way. 1 Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted October 9, 2018 Author Share Posted October 9, 2018 Guys, First I would like to say thank you for all of you who were trying to help, i know I wasn't able to post code and you guys still tried to help so thank you. much appreciated. a quick update, it turns out it wasn't a '-O' issue, but an actual address bug in code issue, where i wanted to refer a memory location and i accidently used the '&' sign. it was flushed out using the -O as the -O changed and optimized the memory layout and when i added routines and variables it was overlapping with that address mistakenly placed. now it is fixed and working as expected, and since then havne't seen -O issues. keep uo the good work all cheers, Yaron 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.