最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

gcc - How to relocate .text sections when using LTO? - Stack Overflow

programmeradmin2浏览0评论

I have firmware a project that needs to have some .text sections split up into different memory areas.
They are spilt using the names of the source-code files, or by function name wildcards in the linker script file.

When LTO is not enabled, the .text sections are split up correctly. When LTO is enabled, they are not.
I do understand why this is happening, but i'm trying to work out a way around it so i can use LTO.

Is there a workaround for this?
I know i can specify a destination section in the code itself by using __attribute__((section(".xxx"))), but i would like to avoid this as i would need to do it to a lot of code.

Thanks in advance!

发布评论

评论列表(0)

  1. 暂无评论