Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- Hi, I don't know the recent situation, but I've posted an implementation http://www.alteraforum.com/forum/showthread.php?t=26331 --- Quote End --- That's a slick-looking patch! I've forwarded it to Walter Goosens (nios2-dev) who has encountered a similar problem. (For the moment he seems to be able to get around it by using -Os.) I'd like to see it (or something similar) upstreamed to the mainline gcc codebase... --- Quote Start --- , And I experienced the problem when my program grew beyond 32KB GOT boundary, not 64KB. Kazu --- Quote End --- Yes, CodeSourcery pointed out to me today that the current limit is in fact 32KB because the compiler is not (yet) using a biased GOT pointer on Nios2. I had not been aware of that. (A week ago I wasn't aware of this issue at all. :-)) Do you have an example program you can share which overruns the GOT? I have the impression that C++ is doing something to generate a lot of globals and overrun the GOT quickly. (http://gcc.gnu.org/wiki/visibility mentions a C++ library with 200000 globals.) Having a concrete example in hand to reproduce this problem would be helpful. Possibly we really should be fixing g++ to be more economical about generating globals, instead-of / as-well-as supporting larger GOTs...?