zoukankan      html  css  js  c++  java
  • STM32,ARM,Keil工具相关

    One ELF Section per Function

    https://blog.csdn.net/iceiilin/article/details/6091575

    因此,可以得出,选项One ELF Section per Function的主要功能是对冗余函数的优化。通过这个选项,可以在最后生成的二进制文件中将冗余函数排除掉(虽然其所在的文件已经参与了编译链接),以便最大程度地优化最后生成的二进制代码。

    而该选项实现的机制是将每一个函数作为一个优化的单元,而并非整个文件作为参与优化的单元。

    选项One ELF Section per Function所具有的这种优化功能特别重要,尤其是在对于生成的二进制文件大小有严格要求的场合。人们习惯将一系列接口函数放在一个文件里,然后将其整个包含在工程中,即使这个文件将只有一个函数被用到。这样,最后生成的二进制文件中就有可能包含众多的冗余函数,造成了宝贵存储空间的浪费。

     The One ELF Section per Function option tells the compiler to put all functions into their own individual ELF

    sections. This allows the linker to remove unused functions.

    An ELF code section typically contains the code for a number of functions. The linker is normally only able to remove

    unused ELF sections, not unused functions. An ELF section can only be removed if all its contents are unused.

    Therefore, splitting each function into its own ELF section allows the compiler to easily identify which ones are unused,

    and remove them.

    Selecting this option increases the time required to compile your code, but results in improved performance.

  • 相关阅读:
    Reverse Integer
    Reverse Bits
    Number of 1 Bits
    House Robber
    02-线性结构1. 一元多项式求导 (25)
    01-复杂度2. Maximum Subsequence Sum (25)
    <转载>使CSS文字图片div元素居中方法之水平居中的几个方法
    <转载>div+css布局教程之div+css常见布局结构定义
    15个必须知道的chrome开发者技巧
    <转载>Div+Css布局教程(-)CSS必备知识
  • 原文地址:https://www.cnblogs.com/yanhc/p/12238197.html
Copyright © 2011-2022 走看看