Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I specify that static data should be placed in the small data area?

0
Posted

How do I specify that static data should be placed in the small data area?

0

You can specify that static data should be placed in the small data area with -msmall-data. This will cause gcc to take advantage of some features of the Alpha architecture by storing heavily used pieces of data in specific sections called the small memory sections. The sections are limited to 64kb which means accessing anything stored in them will only take one instruction. -fPIC will override -msmall-data, so you should use the -fpic flag instead if you do not want -msmall-data to be overridden. This flag should probably not be used in your global CFLAGS as some objects require more than 64kb to be stored, and this will cause a gp_overflow ld error.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.