Chinaunix首页 | 论坛 | 博客
  • 博客访问: 768339
  • 博文数量: 247
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 501
  • 用 户 组: 普通用户
  • 注册时间: 2013-07-12 21:53
个人简介

系统未建立

文章分类

全部博文(247)

文章存档

2021年(1)

2020年(3)

2019年(5)

2018年(3)

2017年(44)

2016年(75)

2015年(52)

2014年(63)

2013年(1)

我的朋友

分类: LINUX

2016-05-09 10:38:59

作者: Sam (甄峰)  

 

Sam在程序开发中,经常要用到多层库嵌套。 Sam常在想,一些底层库的符号(symbols),在上层库乃至应用程序中并非全部要使用到。如果这些符号(symbols)实现一层层报喊道上一层库中,并最终添加到应用程序中,这不是既增大了应用程序大小,也造成运行速度的降低?

 

记得GCC编译选项中有解决这个问题的方法。于是查找之。

 

0. 总体思想:

 

网络上有人建议如下设置:

1. 编译阶段使用:

-ffunction-sections

-fdata-sections

2. 链接阶段使用:

-Wl,--gc-sections

在GCC,LD官方文档中如下讲解:

 

-ffunction-sections -fdata-sections Place each function or data item into its own section in the output file if the target supports arbitrary sections. The name of the function or the name of the data item determines the section's name in the output file.

Use these options on systems where the linker can perform optimizations to improve locality of reference in the instruction space. Most systems using the ELF object format and SPARC processors running Solaris 2 have linkers with such optimizations. AIX may have these optimizations in the future.

Only use these options when there are significant benefits from doing so. When you specify these options, the assembler and linker will create larger object and executable files and will also be slower. You will not be able to use gprof on all systems if you specify this option and you may have problems with debugging if you specify both this option and -g.

--gc-sections --no-gc-sections Enable garbage collection of unused input sections. It is ignored on targets that do not support this option. The default behaviour (of not performing this garbage collection) can be restored by specifying `--no-gc-sections' on the command line.

`--gc-sections' decides which input sections are used by examining symbols and relocations. The section containing the entry symbol and all sections containing symbols undefined on the command-line will be kept, as will sections containing symbols referenced by dynamic objects. Note that when building shared libraries, the linker must assume that any visible symbol is referenced. Once this initial set of sections has been determined, the linker recursively marks as used any section referenced by their relocations. See `--entry' and `--undefined'.

This option can be set when doing a partial link (enabled with option `-r'). In this case the root of symbols kept must be explicitly specified either by an `--entry' or `--undefined' option or by a ENTRY command in the linker script.

 

因为GCC链接操作以section作为最小的处理单元,只要一个section中有某个符号被引用,该section就会被加入。

如果我们的某个.c程序中所有function都加入同一个section.则如果用到这个.c生成的.o的其中任何一个function.则必须将所有function(符号)加入其中。如此,则使用-ffunction-sections 和 -fdata-sections将每个符号创建为一个sections. sections名与function,data名保持一致。

 

则在link阶段,-Wl,--gc-sections 申明去掉不用的section。就可以去掉没用的function(符号)了。

 

总体思想就是这样,Sam决定以验证之。

 

1. 验证过程:

Sam决定以Hi3716C平台中,Graphics_Base,libSTBUtils,3D_Example_HIGO此层次结构为例,研究之。

 

Graphics_Base是个底层库,架设在HiAPI之上,Sam当时选择将其编译为静态库。

libSTBUtils则是中间层,它架设在Graphics_Base层之上,作为3D应用程序的支持库,Sam选择其为动态库。

3D_Example_HIGO是个3D应用程序。依赖于libSTBUtils.so.

 

 

首先于Graphics_Base开始。它由多个.c文件组成。最终编译为静态库---libGraphics_Base.a

1.1 : 静态库中的分别:

即:产生静态库时,是否使用-ffunction-sections, -fdata-sections产生的不同后果。

 

1.1.1: 不使用-ffunction-sections, -fdata-sections

#arm-hisiv200-linux-gcc -c -O2 ...

#arm-hisiv200-linux-ar rv libGraphics_Base.a $?

 

此时,我们会希望看到以下2中信息:

1. .a中包含的符号。

2. .a中包含的sections.

首先看符号:

#arm-hisiv200-linux-readelf  -s libGraphics_Base.a

 

其次看section:

#arm-hisiv200-linux-readelf -t libGraphics_Base.a 

 

 

结果如下:

#arm-hisiv200-linux-readelf  -s libGraphics_Base.a

以下是节选:

   140: 00000000   160 FUNC    GLOBAL DEFAULT    1 HIADP_AVPlay_SetVdecAttr
   141: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_GetAttr
   142: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_SetAttr
   143: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND puts
   144: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND printf
   145: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND _GLOBAL_OFFSET_TABLE_
   146: 000000a0   168 FUNC    GLOBAL DEFAULT    1 HIADP_AVPlay_SetVdecAdvAt
   147: 00000148  1432 FUNC    GLOBAL DEFAULT    1 HIADP_AVPlay_SetAdecAttr
   148: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HIADP_HDMI_SetAdecAttr
   149: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_SND_SetSampleRate
   150: 00000004  1024 OBJECT  GLOBAL DEFAULT  COM u8DecOpenBuf
   151: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __aeabi_uidivmod
   152: 000006e0   264 FUNC    GLOBAL DEFAULT    1 HIADP_AVPlay_PlayAud
   153: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Stop
   154: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Start
   155: 000007e8   524 FUNC    GLOBAL DEFAULT    1 HIADP_AVPlay_PlayProg
   156: 000009f4   504 FUNC    GLOBAL DEFAULT    1 HIADP_AVPlay_Create
   157: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_GetDefaultC
   158: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Create
   159: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_ChnOpen
   160: 00000bec   220 FUNC    GLOBAL DEFAULT    1 HIADP_AVPlay_RegADecLib
   161: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_RegisterAco
   162: 00000cc8    24 FUNC    GLOBAL DEFAULT    1 HIADP_AVPlay_Init
   163: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Init
   164: 00000ce0    56 FUNC    GLOBAL DEFAULT    1 HIADP_SLIC_Close
   165: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND close
   166: 00000d18    92 FUNC    GLOBAL DEFAULT    1 HIADP_AIAO_DeInit
   167: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AI_DisableChn
   168: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AI_Disable
   169: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AO_DisableChn
   170: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AO_Disable
   171: 00000d74   164 FUNC    GLOBAL DEFAULT    1 HIADP_SLIC_SetRinging
   172: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND ioctl
   173: 00000e18    96 FUNC    GLOBAL DEFAULT    1 HIADP_SLIC_GetHookOn
   174: 00000e78    96 FUNC    GLOBAL DEFAULT    1 HIADP_SLIC_GetHookOff
   175: 00000ed8   116 FUNC    GLOBAL DEFAULT    1 HIADP_SLIC_Open
   176: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND open
   177: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sleep
   178: 00000f4c   632 FUNC    GLOBAL DEFAULT    1 HIADP_AIAO_Init
   179: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND AudioSIOPinSharedEnable
   180: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AI_SetPubAttr
   181: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AI_Enable
   182: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AI_EnableChn
   183: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AO_SetPubAttr
   184: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AO_Enable
   185: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_MPI_AO_EnableChn
   186: 000011c4   172 FUNC    GLOBAL DEFAULT    1 HIADP_Snd_DeInit
   187: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_SND_SetInterface
   188: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_SND_Close
   189: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_SND_DeInit
   190: 00001270   196 FUNC    GLOBAL DEFAULT    1 HIADP_Snd_Init
   191: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_SND_Init
   192: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_SND_Open
   193: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND AudioLineOutMuteCntrDisab
   194: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND AudioSPDIFOutSharedEnable
   195: 00001334   100 FUNC    GLOBAL DEFAULT    1 HIADP_VO_DeInit
   196: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_VO_Close
   197: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_VO_DeInit
   198: 00001398   148 FUNC    GLOBAL DEFAULT    1 HIADP_VO_CreatWin
   199: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_VO_CreateWindow
   200: 0000142c   104 FUNC    GLOBAL DEFAULT    1 HIADP_VO_Init
   201: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_VO_Init
   202: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_VO_Open
   203: 00001494   156 FUNC    GLOBAL DEFAULT    1 HIADP_Disp_DeInit
   204: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_Close
   205: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_Detach
   206: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_DeInit
   207: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HIADP_HDMI_DeInit
   208: 00001530   480 FUNC    GLOBAL DEFAULT    1 HIADP_Disp_Init
   209: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_Init
   210: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_SetBgColor
   211: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_SetIntfType
   212: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_SetFormat
   213: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_SetDacMode
   214: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_Attach
   215: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HI_UNF_DISP_Open
   216: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND HIADP_HDMI_Init
   217: 00001710   216 FUNC    GLOBAL DEFAULT    1 HIADP_Disp_StrToFmt
   218: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND strcasestr

 

明显可以看到,以棕色标记的是.a生成的符号。在.a中有实现。

而以红色标记的符号,则大都是HIAPI所提供的符号。它的实现在HI Lib中。所以是UND.

 

再看sections:

#arm-hisiv200-linux-readelf -t libGraphics_Base.a 

节选如下:

Sam只选中一个.o作为代表。

 

 File: libGraphics_Base.a(hi_adp_mpi.o)
There are 15 section headers, starting at offset 0x24f8:

Section Headers:
  [Nr] Name
       Type            Addr     Off    Size   ES   Lk Inf Al
       Flags
  [ 0]
       NULL            00000000 000000 000000 00   0   0  0
       [00000000]:
  [ 1] .text
       PROGBITS        00000000 000034 0017e8 00   0   0  4
       [00000006]: ALLOC, EXEC
  [ 2] .rel.text
       REL             00000000 003cfc 0008f8 08  13   1  4
       [00000000]:
  [ 3] .data
       PROGBITS        00000000 00181c 000014 00   0   0  4
       [00000003]: WRITE, ALLOC
  [ 4] .bss
       NOBITS          00000000 001830 000000 00   0   0  1
       [00000003]: WRITE, ALLOC
  [ 5] .rodata
       PROGBITS        00000000 001830 000030 00   0   0  4
       [00000002]: ALLOC
  [ 6] .data.rel.ro.local
       PROGBITS        00000000 001860 000078 00   0   0  4
       [00000003]: WRITE, ALLOC
  [ 7] .rel.data.rel.ro.local
       REL             00000000 0045f4 0000a0 08  13   6  4
       [00000000]:
  [ 8] .rodata.str1.4
       PROGBITS        00000000 0018d8 000b2c 01   0   0  4
       [00000032]: ALLOC, MERGE, STRINGS
  [ 9] .comment
       PROGBITS        00000000 002404 00003e 00   0   0  1
       [00000000]:
  [10] .note.GNU-stack
       PROGBITS        00000000 002442 000000 00   0   0  1
       [00000000]:
  [11] .ARM.attributes
       ARM_ATTRIBUTES  00000000 002442 00002d 00   0   0  1
       [00000000]:
  [12] .shstrtab
       STRTAB          00000000 00246f 000087 00   0   0  1
       [00000000]:
  [13] .symtab
       SYMTAB          00000000 002750 000db0 10  14 140  4
       [00000000]:
  [14] .strtab
       STRTAB          00000000 003500 0007fb 00   0   0  1

 

可以看到,function是放到同一个section中去的。

 

此时libGraphics_Base.a的大小为:

68564 byte.

 

 

 

1.1.2: 使用-ffunction-sections, -fdata-sections

#arm-hisiv200-linux-gcc -c  -fpic -shared  -Wall -O2 -ffunction-sections -fdata-sections ...

#arm-hisiv200-linux-ar rv libGraphics_Base.a

此时,因为在编译阶段添加了-ffunction-sections -fdata-sections, 所以.o应该生成了以function 名为section名的section.

看生成的section:

#arm-hisiv200-linux-readelf -t libGraphics_Base.a 

File: libGraphics_Base.a(hi_adp_hdmi.o)
There are 49 section headers, starting at offset 0x1414:

Section Headers:
  [Nr] Name
       Type            Addr     Off    Size   ES   Lk Inf Al
       Flags
  [ 0]
       NULL            00000000 000000 000000 00   0   0  0
       [00000000]:
  [ 1] .text
       PROGBITS        00000000 000034 000000 00   0   0  1
       [00000006]: ALLOC, EXEC
  [ 2] .data
       PROGBITS        00000000 000034 000000 00   0   0  1
       [00000003]: WRITE, ALLOC
  [ 3] .bss
       NOBITS          00000000 000034 000000 00   0   0  1
       [00000003]: WRITE, ALLOC
  [ 4] .text.HIADP_HDMI_SetAdecAttr
       PROGBITS        00000000 000034 00003c 00   0   0  4
       [00000006]: ALLOC, EXEC
  [ 5] .rel.text.HIADP_HDMI_SetAdecAttr
       REL             00000000 0028d8 000018 08  47   4  4
       [00000000]:
  [ 6] .text.HIADP_HDMI_DeInit
       PROGBITS        00000000 000070 000020 00   0   0  4
       [00000006]: ALLOC, EXEC
  [ 7] .rel.text.HIADP_HDMI_DeInit
       REL             00000000 0028f0 000018 08  47   6  4
       [00000000]:
  [ 8] .text.HDMI_PinConfig
       PROGBITS        00000000 000090 000038 00   0   0  4
       [00000006]: ALLOC, EXEC
  [ 9] .rel.text.HDMI_PinConfig
       REL             00000000 002908 000018 08  47   8  4
       [00000000]:
  [10] .text.HIADP_HDMI_Init
       PROGBITS        00000000 0000c8 000160 00   0   0  4
       [00000006]: ALLOC, EXEC
  [11] .rel.text.HIADP_HDMI_Init
       REL             00000000 002920 000090 08  47  10  4
       [00000000]:
  [12] .text.HDMI_HdcpSuccess_Proc
       PROGBITS        00000000 000228 00001c 00   0   0  4
       [00000006]: ALLOC, EXEC
  [13] .rel.text.HDMI_HdcpSuccess_Proc
       REL             00000000 0029b0 000018 08  47  12  4
       [00000000]:
  [14] .text.HDMI_HdcpFail_Proc
       PROGBITS        00000000 000244 000058 00   0   0  4
       [00000006]: ALLOC, EXEC
  [15] .rel.text.HDMI_HdcpFail_Proc
       REL             00000000 0029c8 000030 08  47  14  4
       [00000000]:
  [16] .text.HDMI_UnPlug_Proc
       PROGBITS        00000000 00029c 000030 00   0   0  4
       [00000006]: ALLOC, EXEC
  [17] .rel.text.HDMI_UnPlug_Proc
       REL             00000000 0029f8 000020 08  47  16  4
       [00000000]:
  [18] .text.HDMI_PrintSinkCap
       PROGBITS        00000000 0002cc 0001d8 00   0   0  4
       [00000006]: ALLOC, EXEC
  [19] .rel.text.HDMI_PrintSinkCap
       REL             00000000 002a18 000128 08  47  18  4
       [00000000]:
  [20] .text.HDMI_HotPlug_Proc
       PROGBITS        00000000 0004a4 000490 00   0   0  4
       [00000006]: ALLOC, EXEC
  [21] .rel.text.HDMI_HotPlug_Proc
       REL             00000000 002b40 0000f0 08  47  20  4
       [00000000]:
  [22] .text.HDMI_Event_Proc
       PROGBITS        00000000 000934 0000e0 00   0   0  4
       [00000006]: ALLOC, EXEC
  [23] .rel.text.HDMI_Event_Proc
       REL             00000000 002c30 000038 08  47  22  4
       [00000000]:
  [24] .text.stringToUnfFmt
       PROGBITS        00000000 000a14 0000dc 00   0   0  4
       [00000006]: ALLOC, EXEC
  [25] .rel.text.stringToUnfFmt
       REL             00000000 002c68 000050 08  47  24  4
       [00000000]:
  [26] .bss.g_HDCPFlag
       NOBITS          00000000 000af0 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [27] .bss.g_ForceDVIFlag
       NOBITS          00000000 000af0 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [28] .bss.pfnHdmiUserCallback
       NOBITS          00000000 000af0 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [29] .data.g_AudioChannelNum
       PROGBITS        00000000 000af0 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [30] .data.g_HDMIForceMode
       PROGBITS        00000000 000af4 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [31] .bss.g_stHdmiArgs
       NOBITS          00000000 000af8 00001c 00   0   0  4
       [00000003]: WRITE, ALLOC
  [32] .data.rel.ro.local.g_pDispFmtString
       PROGBITS        00000000 000af8 000078 00   0   0  4
       [00000003]: WRITE, ALLOC
  [33] .rel.data.rel.ro.local.g_pDispFmtString
       REL             00000000 002cb8 0000a0 08  47  32  4
       [00000000]:
  [34] .data.g_AudioFreq
       PROGBITS        00000000 000b70 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [35] .rodata.str1.4
       PROGBITS        00000000 000b74 000540 01   0   0  4
       [00000032]: ALLOC, MERGE, STRINGS
  [36] .bss.g_AudioInputType
       NOBITS          00000000 0010b4 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [37] .bss.HDCPFailCount
       NOBITS          00000000 0010b4 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [38] .bss.g_HDMIUserCallbackFlag
       NOBITS          00000000 0010b4 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [39] .bss.g_Audiotype
       NOBITS          00000000 0010b4 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [40] .bss.g_HDMI_Bebug
       NOBITS          00000000 0010b4 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [41] .data.g_AduioBitPerSample
       PROGBITS        00000000 0010b4 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [42] .data.u8FirstTimeSetting.5421
       PROGBITS        00000000 0010b8 000001 00   0   0  1
       [00000003]: WRITE, ALLOC
  [43] .comment
       PROGBITS        00000000 0010b9 00003e 00   0   0  1
       [00000000]:
  [44] .note.GNU-stack
       PROGBITS        00000000 0010f7 000000 00   0   0  1
       [00000000]:
  [45] .ARM.attributes
       ARM_ATTRIBUTES  00000000 0010f7 00002d 00   0   0  1
       [00000000]:
  [46] .shstrtab
       STRTAB          00000000 001124 0002ee 00   0   0  1
       [00000000]:
  [47] .symtab
       SYMTAB          00000000 001bbc 000930 10  48 106  4
       [00000000]:
  [48] .strtab
       STRTAB          00000000 0024ec 0003e9 00   0   0  1
       [00000000]:

看到所有function都成为一个单独的section. 说明-ffunction-sections起效果了。

 

关于符号,则肯定包含所有符号。

大小是:

82496 byte.

 

 

 

1.1.3: 结论:

添加-ffunction-sections -ffdata-sections后,.o 以及.a都会size大不少。

从68564 大到 82496 。

毕竟多建立很多sections.

 

 

1.2: 动态库包含静态库中的分别:

即:产生动态库时,是否使用-ffunction-sections, -fdata-sections产生的不同后果。 以及动态库包含静态库时,使用-Wl,--gc-sections

libSTBUtils.so依赖于libGraphics_Base.a.

 

1.2.1:

动态库生产时不使用-ffunction-sections, -fdata-sections,且所用静态库libGraphics_Base.a也不使用-ffunction-sections, -fdata-sections。

#arm-hisiv200-linux-gcc -c...

#arm-hisiv200-linux-gcc -L../resource -L./ hi_egl.o -L../resource -fPIC -shared   -o libSTBUtils.so -lGraphics_Base  .....

生成.o时使用了没使用-ffunction-sections, -fdata-sections。

 

首先看section.

#arm-hisiv200-linux-readelf -t libSTBUtils.so
There are 31 section headers, starting at offset 0x7b64:

Section Headers:
  [Nr] Name
       Type            Addr     Off    Size   ES   Lk Inf Al
       Flags
  [ 0]
       NULL            00000000 000000 000000 00   0   0  0
       [00000000]:
  [ 1] .hash
       HASH            000000b4 0000b4 000508 04   2   0  4
       [00000002]: ALLOC
  [ 2] .dynsym
       DYNSYM          000005bc 0005bc 000bd0 10   3   3  4
       [00000002]: ALLOC
  [ 3] .dynstr
       STRTAB          0000118c 00118c 000ccf 00   0   0  1
       [00000002]: ALLOC
  [ 4] .gnu.version
       VERSYM          00001e5c 001e5c 00017a 02   2   0  2
       [00000002]: ALLOC
  [ 5] .gnu.version_r
       VERNEED         00001fd8 001fd8 000040 00   3   2  4
       [00000002]: ALLOC
  [ 6] .rel.dyn
       REL             00002018 002018 000200 08   2   0  4
       [00000002]: ALLOC
  [ 7] .rel.plt
       REL             00002218 002218 000400 08   2   9  4
       [00000002]: ALLOC
  [ 8] .init
       PROGBITS        00002618 002618 00000c 00   0   0  4
       [00000006]: ALLOC, EXEC
  [ 9] .plt
       PROGBITS        00002624 002624 000614 04   0   0  4
       [00000006]: ALLOC, EXEC
  [10] .text
       PROGBITS        00002c38 002c38 00323c 00   0   0  4
       [00000006]: ALLOC, EXEC
  [11] .fini
       PROGBITS        00005e74 005e74 000008 00   0   0  4
       [00000006]: ALLOC, EXEC
  [12] .rodata
       PROGBITS        00005e7c 005e7c 0011ac 00   0   0  4
       [00000002]: ALLOC
  [13] .init_array
       INIT_ARRAY      0000f028 007028 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [14] .fini_array
       FINI_ARRAY      0000f02c 00702c 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [15] .jcr
       PROGBITS        0000f030 007030 000004 00   0   0  4
       [00000003]: WRITE, ALLOC
  [16] .data.rel.ro
       PROGBITS        0000f034 007034 0000f0 00   0   0  4
       [00000003]: WRITE, ALLOC
  [17] .dynamic
       DYNAMIC         0000f124 007124 000170 08   3   0  4
       [00000003]: WRITE, ALLOC
  [18] .got
       PROGBITS        0000f294 007294 000260 04   0   0  4
       [00000003]: WRITE, ALLOC
  [19] .data
       PROGBITS        0000f4f4 0074f4 000030 00   0   0  4
       [00000003]: WRITE, ALLOC
  [20] .bss
       NOBITS          0000f524 007524 000454 00   0   0  4
       [00000003]: WRITE, ALLOC
  [21] .ARM.attributes
       ARM_ATTRIBUTES  00000000 007524 000034 00   0   0  1
       [00000000]:
  [22] .comment
       PROGBITS        00000000 007558 0001f0 00   0   0  1
       [00000000]:
  [23] .debug_aranges
       PROGBITS        00000000 007748 000040 00   0   0  8
       [00000000]:
  [24] .debug_info
       PROGBITS        00000000 007788 000172 00   0   0  1
       [00000000]:
  [25] .debug_abbrev
       PROGBITS        00000000 0078fa 000028 00   0   0  1
       [00000000]:
  [26] .debug_line
       PROGBITS        00000000 007922 000107 00   0   0  1
       [00000000]:
  [27] .debug_frame
       PROGBITS        00000000 007a2c 000020 00   0   0  4
       [00000000]:
  [28] .shstrtab
       STRTAB          00000000 007a4c 000117 00   0   0  1
       [00000000]:
  [29] .symtab
       SYMTAB          00000000 00803c 0017f0 10  30 197  4
       [00000000]:
  [30] .strtab
       STRTAB          00000000 00982c 000f21 00   0   0  1
       [00000000]:

 

可以看到function在同一个section中。

 

再看symbols:

节选:

Symbol table '.dynsym' contains 189 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00002618     0 SECTION LOCAL  DEFAULT    8
     2: 0000f030     0 SECTION LOCAL  DEFAULT   15
     3: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (2)
     4: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_SetInfoFrame
     5: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_Disable
     6: 00005084   168 FUNC    GLOBAL DEFAULT   10 AudioSIOPinSharedEnable
     7: 0000f564     4 OBJECT  GLOBAL DEFAULT   20 g_NativeDisplay
     8: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_SetAttr
     9: 0000325c    68 FUNC    GLOBAL DEFAULT   10 hi_egl_makecurrent
    10: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
    11: 0000f560     4 OBJECT  GLOBAL DEFAULT   20 pfnHdmiUserCallback
    12: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_SetInterface
    13: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_SetBgColor
    14: 0000522c   352 FUNC    GLOBAL DEFAULT   10 HIADP_HDMI_Init
    15: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
    16: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_SetAttr
    17: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_GetInfoFrame
    18: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_SetFormat
    19: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_RefreshLayer
    20: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_DestroyLayer
    21: 0000560c  1168 FUNC    GLOBAL DEFAULT   10 HDMI_HotPlug_Proc
    22: 0000f55c     4 OBJECT  GLOBAL DEFAULT   20 g_HDMIUserCallbackFlag
    23: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_GetSampleRate
    24: 0000f578  1024 OBJECT  GLOBAL DEFAULT   20 u8DecOpenBuf
    25: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
    26: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
    27: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_SetPubAttr
    28: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_GetLayerSurface
    29: 000051d4    32 FUNC    GLOBAL DEFAULT   10 HIADP_HDMI_DeInit
    30: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_SYS_DeInit
    31: 00005404    48 FUNC    GLOBAL DEFAULT   10 HDMI_UnPlug_Proc
    32: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_Open
    33: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
    34: 00005e74     0 FUNC    GLOBAL DEFAULT   11 _fini
    35: 00004d04   480 FUNC    GLOBAL DEFAULT   10 HIADP_Disp_Init
    36: 00004c00   104 FUNC    GLOBAL DEFAULT   10 HIADP_VO_Init
    37: 0000f554     4 OBJECT  GLOBAL DEFAULT   20 g_ForceDVIFlag
    38: 00000000     0 FUNC    GLOBAL DEFAULT  UND glGetError
    39: 00002cf4    32 FUNC    GLOBAL DEFAULT   10 hi_egl_getdisp
    40: 0000f548     4 OBJECT  GLOBAL DEFAULT   20 g_HDCPFlag
    41: 0000391c  1432 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_SetAdecAttr
    42: 00005198    60 FUNC    GLOBAL DEFAULT   10 HIADP_HDMI_SetAdecAttr
    43: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
    44: 0000449c    24 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_Init
    45: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglInitialize
    46: 000053a8    92 FUNC    GLOBAL DEFAULT   10 HDMI_HdcpFail_Proc
    47: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
    48: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_Init
    49: 00000000     0 FUNC    GLOBAL DEFAULT  UND glCompressedTexImage2D
    50: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_GPIO_SetDirBit
    51: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_EnableChn
    52: 00004b08   100 FUNC    GLOBAL DEFAULT   10 HIADP_VO_DeInit
    53: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglDestroyContext
    54: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_ChnOpen
    55: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_SetLayerSurface
    56: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Init
    57: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Close
    58: 00003eb4   264 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_PlayAud
    59: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglCreateContext
    60: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_SYS_Init
    61: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglMakeCurrent
    62: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
    63: 000046ac   116 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_Open
    64: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Start
    65: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_SetIntfType
    66: 0000f4f4     0 NOTYPE  GLOBAL DEFAULT   19 __data_start
    67: 0000538c    28 FUNC    GLOBAL DEFAULT   10 HDMI_HdcpSuccess_Proc
    68: 000032a0    84 FUNC    GLOBAL DEFAULT   10 hi_egl_swap
    69: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_GetDefaultC
    70: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_DeInit
    71: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
    72: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Create
    73: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_Enable
    74: 0000f524     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start__
    75: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglSwapBuffers
    76: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_Close
    77: 0000f558     4 OBJECT  GLOBAL DEFAULT   20 g_HDMI_Bebug
    78: 0000f550     4 OBJECT  GLOBAL DEFAULT   20 g_Audiotype
    79: 00002e6c   512 FUNC    GLOBAL DEFAULT   10 hiLoadTGA
    80: 0000f568     4 OBJECT  GLOBAL DEFAULT   20 g_EglDisplay
    81: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
    82: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_SYS_WriteRegister
    83: 00004fbc   176 FUNC    GLOBAL DEFAULT   10 SetReg32Val
    84: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglGetConfigAttrib
    85: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_Disable
    86: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_DisableChn
    87: 0000464c    96 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_GetHookOff
    88: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_GPIO_Close
    89: 00000000     0 FUNC    GLOBAL DEFAULT  UND glBindTexture
    90: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_GetAttr
    91: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_EnableChn
    92: 0000f4f8     4 OBJECT  GLOBAL DEFAULT   19 g_enEncFmt
    93: 0000f518     4 OBJECT  GLOBAL DEFAULT   19 g_AduioBitPerSample
    94: 0000f56c     4 OBJECT  GLOBAL DEFAULT   20 g_NativeWindow
    95: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglDestroySurface
    96: 00004b6c   148 FUNC    GLOBAL DEFAULT   10 HIADP_VO_CreatWin
    97: 000045ec    96 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_GetHookOn
    98: 00000000     0 FUNC    GLOBAL DEFAULT  UND glDeleteTextures
    99: 0000f978     0 NOTYPE  GLOBAL DEFAULT  ABS __end__
   100: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_CreateLayer
   101: 0000f978     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_end__
   102: 00005434   472 FUNC    GLOBAL DEFAULT   10 HDMI_PrintSinkCap
   103: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
   104: 0000306c   496 FUNC    GLOBAL DEFAULT   10 hiLoad2DTexture
   105: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_GetAttr
   106: 00000000     0 FUNC    GLOBAL DEFAULT  UND glPixelStorei
   107: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (2)
   108: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_SetDacMode
   109: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_DeInit
   110: 000044b4    56 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_Close
   111: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_Open
   112: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_Init
   113: 00002d14    32 FUNC    GLOBAL DEFAULT   10 hi_egl_getsurface
   114: 00003780     4 FUNC    GLOBAL DEFAULT   10 hi_egl_DeInit
   115: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_GPIO_Open
   116: 00002d34   312 FUNC    GLOBAL DEFAULT   10 hiLoadPKM
   117: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_CreateWindow
   118: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_RegisterAco
   119: 00004720   632 FUNC    GLOBAL DEFAULT   10 HIADP_AIAO_Init
   120: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (2)
   121: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
   122: 0000f54c     4 OBJECT  GLOBAL DEFAULT   20 g_AudioInputType
   123: 0000f51c     4 OBJECT  GLOBAL DEFAULT   19 g_AudioChannelNum
   124: 0000f520     4 OBJECT  GLOBAL DEFAULT   19 g_HDMIForceMode
   125: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_Enable
   126: 0000f524     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
   127: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_GetFormat
   128: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_SetPubAttr
   129: 00000000     0 FUNC    GLOBAL DEFAULT  UND glTexImage2D
   130: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Init
   131: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
   132: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglGetError
   133: 0000f978     0 NOTYPE  GLOBAL DEFAULT  ABS _bss_end__
   134: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Start
   135: 00005b7c   220 FUNC    GLOBAL DEFAULT   10 stringToUnfFmt
   136: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Open
   137: 000033b4   972 FUNC    GLOBAL DEFAULT   10 hi_egl_setup
   138: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_SetSampleRate
   139: 000041c8   504 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_Create
   140: 00003874   168 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_SetVdecAdvAt
   141: 0000512c   108 FUNC    GLOBAL DEFAULT   10 AudioLineOutMuteCntrDisab
   142: 000037d4   160 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_SetVdecAttr
   143: 0000f514     4 OBJECT  GLOBAL DEFAULT   19 g_AudioFreq
   144: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
   145: 000044ec    92 FUNC    GLOBAL DEFAULT   10 HIADP_AIAO_DeInit
   146: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Attach
   147: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_Close
   148: 000043c0   220 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_RegADecLib
   149: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
   150: 00004ee4   216 FUNC    GLOBAL DEFAULT   10 HIADP_Disp_StrToFmt
   151: 00003fbc   524 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_PlayProg
   152: 00004a44   196 FUNC    GLOBAL DEFAULT   10 HIADP_Snd_Init
   153: 0000f978     0 NOTYPE  GLOBAL DEFAULT  ABS _end
   154: 00005a9c   224 FUNC    GLOBAL DEFAULT   10 HDMI_Event_Proc
   155: 00004998   172 FUNC    GLOBAL DEFAULT   10 HIADP_Snd_DeInit
   156: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Stop
   157: 0000506c    24 FUNC    GLOBAL DEFAULT   10 AudioSPDIFOutSharedEnable
   158: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_GPIO_WriteBit
   159: 00004548   164 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_SetRinging
   160: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Init
   161: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_DeInit
   162: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_Init
   163: 000051f4    56 FUNC    GLOBAL DEFAULT   10 HDMI_PinConfig
   164: 00000000     0 OBJECT  GLOBAL DEFAULT  UND  (3)
   165: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_GetSinkCapabi
   166: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Stop
   167: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
   168: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Open
   169: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_DeInit
   170: 000032f4   192 FUNC    GLOBAL DEFAULT   10 hi_egl_destroy
   171: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_DisableChn
   172: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Detach
   173: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglBindAPI
   174: 00003784    80 FUNC    GLOBAL DEFAULT   10 hi_egl_Init
   175: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Close
   176: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (3)
   177: 0000f524     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
   178: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglGetDisplay
   179: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglTerminate
   180: 00000000     0 FUNC    GLOBAL DEFAULT  UND glTexParameteri
   181: 0000f570     4 OBJECT  GLOBAL DEFAULT   20 g_EglSurface
   182: 0000f574     4 OBJECT  GLOBAL DEFAULT   20 g_EglContext
   183: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglCreateWindowSurface
   184: 00000000     0 FUNC    GLOBAL DEFAULT  UND glGenTextures
   185: 00000000     0 FUNC    WEAK   DEFAULT  UND  (3)
   186: 00002618     0 FUNC    GLOBAL DEFAULT    8 _init
   187: 00004c68   156 FUNC    GLOBAL DEFAULT   10 HIADP_Disp_DeInit
   188: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglChooseConfig

197: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   198: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_SetInfoFrame
   199: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_Disable
   200: 00005084   168 FUNC    GLOBAL DEFAULT   10 AudioSIOPinSharedEnable
   201: 0000f564     4 OBJECT  GLOBAL DEFAULT   20 g_NativeDisplay
   202: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_SetAttr
   203: 0000325c    68 FUNC    GLOBAL DEFAULT   10 hi_egl_makecurrent
   204: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   205: 0000f560     4 OBJECT  GLOBAL DEFAULT   20 pfnHdmiUserCallback
   206: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_SetInterface
   207: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_SetBgColor
   208: 0000522c   352 FUNC    GLOBAL DEFAULT   10 HIADP_HDMI_Init
   209: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   210: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_SetAttr
   211: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_GetInfoFrame
   212: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_SetFormat
   213: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_RefreshLayer
   214: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_DestroyLayer
   215: 0000560c  1168 FUNC    GLOBAL DEFAULT   10 HDMI_HotPlug_Proc
   216: 0000f55c     4 OBJECT  GLOBAL DEFAULT   20 g_HDMIUserCallbackFlag
   217: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_GetSampleRate
   218: 0000f578  1024 OBJECT  GLOBAL DEFAULT   20 u8DecOpenBuf
   219: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
   220: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
   221: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_SetPubAttr
   222: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_GetLayerSurface
   223: 000051d4    32 FUNC    GLOBAL DEFAULT   10 HIADP_HDMI_DeInit
   224: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_SYS_DeInit
   225: 00005404    48 FUNC    GLOBAL DEFAULT   10 HDMI_UnPlug_Proc
   226: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_Open
   227: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   228: 00005e74     0 FUNC    GLOBAL DEFAULT   11 _fini
   229: 00004d04   480 FUNC    GLOBAL DEFAULT   10 HIADP_Disp_Init
   230: 00004c00   104 FUNC    GLOBAL DEFAULT   10 HIADP_VO_Init
   231: 0000f554     4 OBJECT  GLOBAL DEFAULT   20 g_ForceDVIFlag
   232: 00000000     0 FUNC    GLOBAL DEFAULT  UND glGetError
   233: 00002cf4    32 FUNC    GLOBAL DEFAULT   10 hi_egl_getdisp
   234: 0000f548     4 OBJECT  GLOBAL DEFAULT   20 g_HDCPFlag
   235: 0000391c  1432 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_SetAdecAttr
   236: 00005198    60 FUNC    GLOBAL DEFAULT   10 HIADP_HDMI_SetAdecAttr
   237: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   238: 0000449c    24 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_Init
   239: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglInitialize
   240: 000053a8    92 FUNC    GLOBAL DEFAULT   10 HDMI_HdcpFail_Proc
   241: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   242: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_Init
   243: 00000000     0 FUNC    GLOBAL DEFAULT  UND glCompressedTexImage2D
   244: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_GPIO_SetDirBit
   245: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_EnableChn
   246: 00004b08   100 FUNC    GLOBAL DEFAULT   10 HIADP_VO_DeInit
   247: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglDestroyContext
   248: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_ChnOpen
   249: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_SetLayerSurface
   250: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Init
   251: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Close
   252: 00003eb4   264 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_PlayAud
   253: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglCreateContext
   254: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_SYS_Init
   255: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglMakeCurrent
   256: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   257: 000046ac   116 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_Open
   258: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Start
   259: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_SetIntfType
   260: 0000f4f4     0 NOTYPE  GLOBAL DEFAULT   19 __data_start
   261: 0000538c    28 FUNC    GLOBAL DEFAULT   10 HDMI_HdcpSuccess_Proc
   262: 000032a0    84 FUNC    GLOBAL DEFAULT   10 hi_egl_swap
   263: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_GetDefaultC
   264: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_DeInit
   265: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   266: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Create
   267: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_Enable
   268: 0000f524     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start__
   269: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglSwapBuffers
   270: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_Close
   271: 0000f558     4 OBJECT  GLOBAL DEFAULT   20 g_HDMI_Bebug
   272: 0000f550     4 OBJECT  GLOBAL DEFAULT   20 g_Audiotype
   273: 00002e6c   512 FUNC    GLOBAL DEFAULT   10 hiLoadTGA
   274: 0000f568     4 OBJECT  GLOBAL DEFAULT   20 g_EglDisplay
   275: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   276: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_SYS_WriteRegister
   277: 00004fbc   176 FUNC    GLOBAL DEFAULT   10 SetReg32Val
   278: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglGetConfigAttrib
   279: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_Disable
   280: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AO_DisableChn
   281: 0000464c    96 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_GetHookOff
   282: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_GPIO_Close
   283: 00000000     0 FUNC    GLOBAL DEFAULT  UND glBindTexture
   284: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_GetAttr
   285: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_EnableChn
   286: 0000f4f8     4 OBJECT  GLOBAL DEFAULT   19 g_enEncFmt
   287: 0000f518     4 OBJECT  GLOBAL DEFAULT   19 g_AduioBitPerSample
   288: 0000f56c     4 OBJECT  GLOBAL DEFAULT   20 g_NativeWindow
   289: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglDestroySurface
   290: 00004b6c   148 FUNC    GLOBAL DEFAULT   10 HIADP_VO_CreatWin
   291: 000045ec    96 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_GetHookOn
   292: 00000000     0 FUNC    GLOBAL DEFAULT  UND glDeleteTextures
   293: 0000f978     0 NOTYPE  GLOBAL DEFAULT  ABS __end__
   294: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_GO_CreateLayer
   295: 0000f978     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_end__
   296: 00005434   472 FUNC    GLOBAL DEFAULT   10 HDMI_PrintSinkCap
   297: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   298: 0000306c   496 FUNC    GLOBAL DEFAULT   10 hiLoad2DTexture
   299: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_GetAttr
   300: 00000000     0 FUNC    GLOBAL DEFAULT  UND glPixelStorei
   301: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   302: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_SetDacMode
   303: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_DeInit
   304: 000044b4    56 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_Close
   305: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_Open
   306: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_Init
   307: 00002d14    32 FUNC    GLOBAL DEFAULT   10 hi_egl_getsurface
   308: 00003780     4 FUNC    GLOBAL DEFAULT   10 hi_egl_DeInit
   309: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_GPIO_Open
   310: 00002d34   312 FUNC    GLOBAL DEFAULT   10 hiLoadPKM
   311: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_CreateWindow
   312: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_RegisterAco
   313: 00004720   632 FUNC    GLOBAL DEFAULT   10 HIADP_AIAO_Init
   314: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   315: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   316: 0000f54c     4 OBJECT  GLOBAL DEFAULT   20 g_AudioInputType
   317: 0000f51c     4 OBJECT  GLOBAL DEFAULT   19 g_AudioChannelNum
   318: 0000f520     4 OBJECT  GLOBAL DEFAULT   19 g_HDMIForceMode
   319: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_Enable
   320: 0000f524     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
   321: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_GetFormat
   322: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_SetPubAttr
   323: 00000000     0 FUNC    GLOBAL DEFAULT  UND glTexImage2D
   324: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Init
   325: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   326: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglGetError
   327: 0000f978     0 NOTYPE  GLOBAL DEFAULT  ABS _bss_end__
   328: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Start
   329: 00005b7c   220 FUNC    GLOBAL DEFAULT   10 stringToUnfFmt
   330: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Open
   331: 000033b4   972 FUNC    GLOBAL DEFAULT   10 hi_egl_setup
   332: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_SetSampleRate
   333: 000041c8   504 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_Create
   334: 00003874   168 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_SetVdecAdvAt
   335: 0000512c   108 FUNC    GLOBAL DEFAULT   10 AudioLineOutMuteCntrDisab
   336: 000037d4   160 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_SetVdecAttr
   337: 0000f514     4 OBJECT  GLOBAL DEFAULT   19 g_AudioFreq
   338: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   339: 000044ec    92 FUNC    GLOBAL DEFAULT   10 HIADP_AIAO_DeInit
   340: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Attach
   341: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_SND_Close
   342: 000043c0   220 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_RegADecLib
   343: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   344: 00004ee4   216 FUNC    GLOBAL DEFAULT   10 HIADP_Disp_StrToFmt
   345: 00003fbc   524 FUNC    GLOBAL DEFAULT   10 HIADP_AVPlay_PlayProg
   346: 00004a44   196 FUNC    GLOBAL DEFAULT   10 HIADP_Snd_Init
   347: 0000f978     0 NOTYPE  GLOBAL DEFAULT  ABS _end
   348: 00005a9c   224 FUNC    GLOBAL DEFAULT   10 HDMI_Event_Proc
   349: 00004998   172 FUNC    GLOBAL DEFAULT   10 HIADP_Snd_DeInit
   350: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_AVPLAY_Stop
   351: 0000506c    24 FUNC    GLOBAL DEFAULT   10 AudioSPDIFOutSharedEnable
   352: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_GPIO_WriteBit
   353: 00004548   164 FUNC    GLOBAL DEFAULT   10 HIADP_SLIC_SetRinging
   354: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Init
   355: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_DeInit
   356: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_Init
   357: 000051f4    56 FUNC    GLOBAL DEFAULT   10 HDMI_PinConfig
   358: 00000000     0 OBJECT  GLOBAL DEFAULT  UND 
   359: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_GetSinkCapabi
   360: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Stop
   361: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   362: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Open
   363: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_VO_DeInit
   364: 000032f4   192 FUNC    GLOBAL DEFAULT   10 hi_egl_destroy
   365: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_MPI_AI_DisableChn
   366: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_DISP_Detach
   367: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglBindAPI
   368: 00003784    80 FUNC    GLOBAL DEFAULT   10 hi_egl_Init
   369: 00000000     0 FUNC    GLOBAL DEFAULT  UND HI_UNF_HDMI_Close
   370: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   371: 0000f524     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
   372: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglGetDisplay
   373: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglTerminate
   374: 00000000     0 FUNC    GLOBAL DEFAULT  UND glTexParameteri
   375: 0000f570     4 OBJECT  GLOBAL DEFAULT   20 g_EglSurface
   376: 0000f574     4 OBJECT  GLOBAL DEFAULT   20 g_EglContext
   377: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglCreateWindowSurface
   378: 00000000     0 FUNC    GLOBAL DEFAULT  UND glGenTextures
   379: 00000000     0 FUNC    WEAK   DEFAULT  UND 
   380: 00002618     0 FUNC    GLOBAL DEFAULT    8 _init
   381: 00004c68   156 FUNC    GLOBAL DEFAULT   10 HIADP_Disp_DeInit
   382: 00000000     0 FUNC    GLOBAL DEFAULT  UND eglChooseConfig

 

注意:

libSTBUtils.so: 所导出出hi_gel_Init()等符号均有导出。

且所用到的libGraphics_Base.a 符号也有导出和实现。 HIAPI以及Glibc的符号均为等待链接。但请注意,有些符号如:HIADP_Snd_Init,其实并未用到,但也包含在libSTBUtils.so中了。

 

这里libSTBUtils.so大小为:

42829。

说明动态库依赖于静态库时,也只是挑选自己用到的东西。并非全部包含。但某些未用到的符号,也会被包含其中。

 

 

1.2.2:

动态库生产时使用-ffunction-sections, -fdata-sections,且所用静态库libGraphics_Base.a也使用-ffunction-sections, -fdata-sections。 同时,ld时还使用 -Wl,--gc-sections

 

Sam发现虽然.o生成了多个section. 但so 却并未有多个section.

存疑。

 

但符号却并不见减少。 也存疑问。并经使用了 -Wl,--gc-sections

 

库大小是:

43261

 

 

 

 

1.2.3: 结论:

 

 

 

1.3:

应用程序:

1.3.1:
使用未-ffunction-sections,-fdata-sections的动态库,且不使用-Wl,--gc-sections.

#arm-hisiv200-linux-g++ -c

#arm-hisiv200-linux-g++ -L../resource main.o font.o mesh.o render.o texture.o timer.o  -o 3D_Example_HIGO -lSTBUtils ....

1.3.1.1: 查看符号:

Symbol table '.dynsym' contains 103 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00009510     0 FUNC    GLOBAL DEFAULT  UND  (2)
     2: 0000951c     0 FUNC    GLOBAL DEFAULT  UND glEnable
     3: 00015598     4 OBJECT  GLOBAL DEFAULT   23 mesh
     4: 00009528     0 FUNC    GLOBAL DEFAULT  UND glTexCoordPointer
     5: 00009534     0 FUNC    GLOBAL DEFAULT  UND  (3)
     6: 00009540     0 FUNC    GLOBAL DEFAULT  UND _Znaj
     7: 000155a8     4 OBJECT  GLOBAL DEFAULT   23 texture
     8: 0000954c     0 FUNC    GLOBAL DEFAULT  UND  (2)
     9: 00009558     0 FUNC    GLOBAL DEFAULT  UND  (3)
    10: 00009564     0 FUNC    GLOBAL DEFAULT  UND glEnableClientState
    11: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (2)
    12: 00009570     0 FUNC    GLOBAL DEFAULT  UND _ZdaPv
    13: 0000957c     0 FUNC    GLOBAL DEFAULT  UND  (2)
    14: 00009588     0 FUNC    GLOBAL DEFAULT  UND glMatrixMode
    15: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
    16: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
    17: 000095a0     0 FUNC    GLOBAL DEFAULT  UND glDisable
    18: 000095ac     0 FUNC    GLOBAL DEFAULT  UND glClear
    19: 000095b8     0 FUNC    GLOBAL DEFAULT  UND  (2)
    20: 000095c4     0 FUNC    GLOBAL DEFAULT  UND  (3)
    21: 00014570     4 OBJECT  GLOBAL DEFAULT   22 width
    22: 000095d0     0 FUNC    GLOBAL DEFAULT  UND  (3)
    23: 0000bf48     0 FUNC    GLOBAL DEFAULT   13 _fini
    24: 000095dc     0 FUNC    GLOBAL DEFAULT  UND glOrthox
    25: 000095e8     0 FUNC    GLOBAL DEFAULT  UND glColor4x
    26: 000095f4     0 FUNC    GLOBAL DEFAULT  UND glGetError
    27: 00009600     0 FUNC    GLOBAL DEFAULT  UND hi_egl_getdisp
    28: 0000960c     0 FUNC    GLOBAL DEFAULT  UND  (3)
    29: 00009618     0 FUNC    GLOBAL DEFAULT  UND glClearColorx
    30: 00014574     4 OBJECT  GLOBAL DEFAULT   22 height
    31: 00009624     0 FUNC    GLOBAL DEFAULT  UND _ZdlPv
    32: 0001559c     4 OBJECT  GLOBAL DEFAULT   23 font
    33: 00009630     0 FUNC    GLOBAL DEFAULT  UND eglQuerySurface
    34: 0000963c     0 FUNC    GLOBAL DEFAULT  UND glLoadIdentity
    35: 00014580     4 OBJECT  GLOBAL DEFAULT   23 x
    36: 00009648     0 FUNC    GLOBAL DEFAULT  UND glDeleteBuffers
    37: 00009654     0 FUNC    GLOBAL DEFAULT  UND  (3)
    38: 00009660     0 FUNC    GLOBAL DEFAULT  UND  (2)
    39: 0000966c     0 FUNC    GLOBAL DEFAULT  UND glShadeModel
    40: 00014568     0 NOTYPE  GLOBAL DEFAULT   22 __data_start
    41: 00009678     0 FUNC    GLOBAL DEFAULT  UND hi_egl_swap
    42: 00009684     0 FUNC    GLOBAL DEFAULT  UND  (3)
    43: 00009690     0 FUNC    GLOBAL DEFAULT  UND glBufferData
    44: 0000969c     0 FUNC    GLOBAL DEFAULT  UND  (3)
    45: 000096a8     0 FUNC    GLOBAL DEFAULT  UND BCMUtil_Audio_Destroy
    46: 000096b4     0 FUNC    GLOBAL DEFAULT  UND glNormalPointer
    47: 000096c0     0 FUNC    GLOBAL DEFAULT  UND __gxx_personality_v0
    48: 0001457c     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start__
    49: 000096cc     0 FUNC    GLOBAL DEFAULT  UND glBlendFunc
    50: 000096d8     0 FUNC    GLOBAL DEFAULT  UND  (3)
    51: 000096e4     0 FUNC    GLOBAL DEFAULT  UND glBindTexture
    52: 000096f0     0 FUNC    GLOBAL DEFAULT  UND glTexParameterx
    53: 00014588     4 OBJECT  GLOBAL DEFAULT   23 sampling
    54: 000096fc     0 FUNC    GLOBAL DEFAULT  UND  (3)
    55: 0001458c     4 OBJECT  GLOBAL DEFAULT   23 iNum
    56: 00009708     0 FUNC    GLOBAL DEFAULT  UND glTranslatef
    57: 00014584     4 OBJECT  GLOBAL DEFAULT   23 y
    58: 00009714     0 FUNC    GLOBAL DEFAULT  UND glDeleteTextures
    59: 00009720     0 FUNC    GLOBAL DEFAULT  UND  (2)
    60: 0000972c     0 FUNC    GLOBAL DEFAULT  UND  (3)
    61: 00009738     0 FUNC    GLOBAL DEFAULT  UND glDisableClientState
    62: 00009744     0 FUNC    GLOBAL DEFAULT  UND __cxa_end_cleanup
    63: 00009750     0 FUNC    GLOBAL DEFAULT  UND  (2)
    64: 000155ac     0 NOTYPE  GLOBAL DEFAULT  ABS __end__
    65: 000155ac     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_end__
    66: 0000975c     0 FUNC    GLOBAL DEFAULT  UND  (3)
    67: 00009768     0 FUNC    GLOBAL DEFAULT  UND hiLoad2DTexture
    68: 00009774     0 FUNC    GLOBAL DEFAULT  UND glFrustumf
    69: 00015590     1 OBJECT  GLOBAL DEFAULT   23 _ZN13BitmappedFont11m_ins
    70: 00009780     0 FUNC    GLOBAL DEFAULT  UND hi_egl_getsurface
    71: 0000978c     0 FUNC    GLOBAL DEFAULT  UND hi_egl_DeInit
    72: 00009798     0 FUNC    GLOBAL DEFAULT  UND glGenBuffers
    73: 000097a4     0 FUNC    GLOBAL DEFAULT  UND glDrawElements
    74: 0001457c     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
    75: 000097b0     0 FUNC    GLOBAL DEFAULT  UND glTexImage2D
    76: 000097bc     0 FUNC    GLOBAL DEFAULT  UND glRotatef
    77: 000097c8     0 FUNC    GLOBAL DEFAULT  UND  (2)
    78: 000155ac     0 NOTYPE  GLOBAL DEFAULT  ABS _bss_end__
    79: 00014578     4 OBJECT  GLOBAL DEFAULT   22 frames
    80: 000097d4     0 FUNC    GLOBAL DEFAULT  UND glDrawArrays
    81: 000097e0     0 FUNC    GLOBAL DEFAULT  UND  (2)
    82: 000097ec     0 FUNC    GLOBAL DEFAULT  UND hi_egl_setup
    83: 00014590  4096 OBJECT  GLOBAL DEFAULT   23 _ZN13BitmappedFont20m_tex
    84: 000155a4     4 OBJECT  GLOBAL DEFAULT   23 timer
    85: 000097f8     0 FUNC    GLOBAL DEFAULT  UND  (3)
    86: 000155ac     0 NOTYPE  GLOBAL DEFAULT  ABS _end
    87: 00009804     0 FUNC    GLOBAL DEFAULT  UND glBindBuffer
    88: 00009810     0 FUNC    GLOBAL DEFAULT  UND  (2)
    89: 0000981c     0 FUNC    GLOBAL DEFAULT  UND glVertexPointer
    90: 00009828     0 FUNC    GLOBAL DEFAULT  UND  (4)
    91: 00009834     0 FUNC    GLOBAL DEFAULT  UND hi_egl_destroy
    92: 00009840     0 FUNC    GLOBAL DEFAULT  UND hi_egl_Init
    93: 0000984c     0 FUNC    GLOBAL DEFAULT  UND  (3)
    94: 00009858     0 FUNC    GLOBAL DEFAULT  UND  (2)
    95: 0001457c     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
    96: 00009864     0 FUNC    GLOBAL DEFAULT  UND _Znwj
    97: 00000000     0 FUNC    GLOBAL DEFAULT  UND  (2)
    98: 00009870     0 FUNC    GLOBAL DEFAULT  UND BCMUtil_Audio_Init
    99: 0000987c     0 FUNC    GLOBAL DEFAULT  UND  (3)
   100: 000155a0     4 OBJECT  GLOBAL DEFAULT   23 meshTexture
   101: 00009888     0 FUNC    GLOBAL DEFAULT  UND glGenTextures
   102: 000094f0     0 FUNC    GLOBAL DEFAULT   10 _init

 137: 000143f4     0 OBJECT  LOCAL  HIDDEN   21 _GLOBAL_OFFSET_TABLE_
   138: 00014254     0 NOTYPE  LOCAL  HIDDEN   17 __init_array_end
   139: 00014250     0 NOTYPE  LOCAL  HIDDEN   17 __init_array_start
   140: 0001425c     0 OBJECT  LOCAL  HIDDEN   20 _DYNAMIC
   141: 000094fc     0 NOTYPE  LOCAL  DEFAULT   11 $a
   142: 0000950c     0 NOTYPE  LOCAL  DEFAULT   11 $d
   143: 00009510     0 NOTYPE  LOCAL  DEFAULT   11 $a
   144: 00014568     0 NOTYPE  WEAK   DEFAULT   22 data_start
   145: 00009510     0 FUNC    GLOBAL DEFAULT  UND 
   146: 0000951c     0 FUNC    GLOBAL DEFAULT  UND glEnable
   147: 00015598     4 OBJECT  GLOBAL DEFAULT   23 mesh
   148: 00009528     0 FUNC    GLOBAL DEFAULT  UND glTexCoordPointer
   149: 00009534     0 FUNC    GLOBAL DEFAULT  UND 
   150: 0000b42c   408 FUNC    GLOBAL DEFAULT   12 _Z8InitGLESv
   151: 00009540     0 FUNC    GLOBAL DEFAULT  UND _Znaj
   152: 0000be78     4 FUNC    GLOBAL DEFAULT   12 __libc_csu_fini
   153: 000155a8     4 OBJECT  GLOBAL DEFAULT   23 texture
   154: 0000954c     0 FUNC    GLOBAL DEFAULT  UND 
   155: 00009894     0 FUNC    GLOBAL DEFAULT   12 _start
   156: 0000a1e4   328 FUNC    GLOBAL DEFAULT   12 _ZN4Mesh4DrawEv
   157: 0000bde0    24 FUNC    GLOBAL DEFAULT   12 _ZN5TimerC1Ev
   158: 00009558     0 FUNC    GLOBAL DEFAULT  UND _
   159: 00009564     0 FUNC    GLOBAL DEFAULT  UND glEnableClientState
   160: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   161: 00009570     0 FUNC    GLOBAL DEFAULT  UND _ZdaPv
   162: 0000957c     0 FUNC    GLOBAL DEFAULT  UND 
   163: 00009588     0 FUNC    GLOBAL DEFAULT  UND glMatrixMode
   164: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
   165: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
   166: 000095a0     0 FUNC    GLOBAL DEFAULT  UND glDisable
   167: 000095ac     0 FUNC    GLOBAL DEFAULT  UND glClear
   168: 000095b8     0 FUNC    GLOBAL DEFAULT  UND 
   169: 000095c4     0 FUNC    GLOBAL DEFAULT  UND 
   170: 00014570     4 OBJECT  GLOBAL DEFAULT   22 width
   171: 00009f5c   524 FUNC    GLOBAL DEFAULT   12 _ZN13BitmappedFont5PrintE
   172: 000095d0     0 FUNC    GLOBAL DEFAULT  UND 
   173: 0000bf48     0 FUNC    GLOBAL DEFAULT   13 _fini
   174: 000095dc     0 FUNC    GLOBAL DEFAULT  UND glOrthox
   175: 000095e8     0 FUNC    GLOBAL DEFAULT  UND glColor4x
   176: 000095f4     0 FUNC    GLOBAL DEFAULT  UND glGetError
   177: 00009600     0 FUNC    GLOBAL DEFAULT  UND hi_egl_getdisp
   178: 0000960c     0 FUNC    GLOBAL DEFAULT  UND 
   179: 00009618     0 FUNC    GLOBAL DEFAULT  UND glClearColorx
   180: 00014574     4 OBJECT  GLOBAL DEFAULT   22 height
   181: 00009624     0 FUNC    GLOBAL DEFAULT  UND _ZdlPv
   182: 0001559c     4 OBJECT  GLOBAL DEFAULT   23 font
   183: 00009630     0 FUNC    GLOBAL DEFAULT  UND eglQuerySurface
   184: 0000963c     0 FUNC    GLOBAL DEFAULT  UND glLoadIdentity
   185: 0000a1a0    68 FUNC    GLOBAL DEFAULT   12 _ZN13BitmappedFont12Enabl
   186: 00014580     4 OBJECT  GLOBAL DEFAULT   23 x
   187: 0000b85c   148 FUNC    GLOBAL DEFAULT   12 _ZN7Texture7LoadRawEPKcPP
   188: 00009648     0 FUNC    GLOBAL DEFAULT  UND glDeleteBuffers
   189: 00009f54     4 FUNC    GLOBAL DEFAULT   12 _ZN13BitmappedFontD2Ev
   190: 00009654     0 FUNC    GLOBAL DEFAULT  UND 
   191: 00009660     0 FUNC    GLOBAL DEFAULT  UND 
   192: 0000bf50     4 OBJECT  GLOBAL DEFAULT   14 _IO_stdin_used
   193: 0000966c     0 FUNC    GLOBAL DEFAULT  UND glShadeModel
   194: 00014568     0 NOTYPE  GLOBAL DEFAULT   22 __data_start
   195: 00009678     0 FUNC    GLOBAL DEFAULT  UND hi_egl_swap
   196: 00009684     0 FUNC    GLOBAL DEFAULT  UND 
   197: 00009690     0 FUNC    GLOBAL DEFAULT  UND glBufferData
   198: 0000969c     0 FUNC    GLOBAL DEFAULT  UND 
   199: 000096a8     0 FUNC    GLOBAL DEFAULT  UND BCMUtil_Audio_Destroy
   200: 000096b4     0 FUNC    GLOBAL DEFAULT  UND glNormalPointer
   201: 0000b1d4   200 FUNC    GLOBAL DEFAULT   12 _Z9CleanGLESv
   202: 000096c0     0 FUNC    GLOBAL DEFAULT  UND __gxx_personality_v0
   203: 0001457c     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start__
   204: 0000b29c   400 FUNC    GLOBAL DEFAULT   12 _Z6Renderv
   205: 000096cc     0 FUNC    GLOBAL DEFAULT  UND glBlendFunc
   206: 00009940   604 FUNC    GLOBAL DEFAULT   12 _Z16ParseCommandLineiPPc
   207: 000096d8     0 FUNC    GLOBAL DEFAULT  UND 
   208: 0000bb78   592 FUNC    GLOBAL DEFAULT   12 _ZN7TextureC2EPKcjjjjiii
   209: 000096e4     0 FUNC    GLOBAL DEFAULT  UND glBindTexture
   210: 000096f0     0 FUNC    GLOBAL DEFAULT  UND glTexParameterx
   211: 00014588     4 OBJECT  GLOBAL DEFAULT   23 sampling
   212: 000096fc     0 FUNC    GLOBAL DEFAULT  UND 
   213: 0001458c     4 OBJECT  GLOBAL DEFAULT   23 iNum
   214: 00009708     0 FUNC    GLOBAL DEFAULT  UND glTranslatef
   215: 00014584     4 OBJECT  GLOBAL DEFAULT   23 y
   216: 00009714     0 FUNC    GLOBAL DEFAULT  UND glDeleteTextures
   217: 0001456c     0 OBJECT  GLOBAL HIDDEN   22 __dso_handle
   218: 00009720     0 FUNC    GLOBAL DEFAULT  UND 
   219: 0000b668   500 FUNC    GLOBAL DEFAULT   12 _ZN7Texture7LoadTGAEPKcPP
   220: 0000972c     0 FUNC    GLOBAL DEFAULT  UND 
   221: 00009738     0 FUNC    GLOBAL DEFAULT  UND glDisableClientState
   222: 00009744     0 FUNC    GLOBAL DEFAULT  UND __cxa_end_cleanup
   223: 00009750     0 FUNC    GLOBAL DEFAULT  UND 
   224: 000155ac     0 NOTYPE  GLOBAL DEFAULT  ABS __end__
   225: 0000bdf8    64 FUNC    GLOBAL DEFAULT   12 _Z8GetTicksv
   226: 0000be7c   204 FUNC    GLOBAL DEFAULT   12 __libc_csu_init
   227: 000155ac     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_end__
   228: 0000975c     0 FUNC    GLOBAL DEFAULT  UND 
   229: 00009768     0 FUNC    GLOBAL DEFAULT  UND hiLoad2DTexture
   230: 00009774     0 FUNC    GLOBAL DEFAULT  UND glFrustumf
   231: 00009e4c   264 FUNC    GLOBAL DEFAULT   12 _ZN13BitmappedFontC1Ejii
   232: 0000b094   168 FUNC    GLOBAL DEFAULT   12 _Z14SetPerspectivev
   233: 00015590     1 OBJECT  GLOBAL DEFAULT   23 _ZN13BitmappedFont11m_ins
   234: 00009780     0 FUNC    GLOBAL DEFAULT  UND hi_egl_getsurface
   235: 0000978c     0 FUNC    GLOBAL DEFAULT  UND hi_egl_DeInit
   236: 00009798     0 FUNC    GLOBAL DEFAULT  UND glGenBuffers
   237: 000097a4     0 FUNC    GLOBAL DEFAULT  UND glDrawElements
   238: 00009d44   264 FUNC    GLOBAL DEFAULT   12 _ZN13BitmappedFontC2Ejii
   239: 0001457c     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
   240: 0000aa14  1472 FUNC    GLOBAL DEFAULT   12 _ZN4MeshC2EPKcb
   241: 000097b0     0 FUNC    GLOBAL DEFAULT  UND glTexImage2D
   242: 000097bc     0 FUNC    GLOBAL DEFAULT  UND glRotatef
   243: 000097c8     0 FUNC    GLOBAL DEFAULT  UND 
   244: 000155ac     0 NOTYPE  GLOBAL DEFAULT  ABS _bss_end__
   245: 0000bdc8    24 FUNC    GLOBAL DEFAULT   12 _ZN5TimerC2Ev
   246: 00014578     4 OBJECT  GLOBAL DEFAULT   22 frames
   247: 0000afd4   192 FUNC    GLOBAL DEFAULT   12 _Z11Perspectiveffff
   248: 0000a32c   148 FUNC    GLOBAL DEFAULT   12 _ZN4MeshD1Ev
   249: 000097d4     0 FUNC    GLOBAL DEFAULT  UND glDrawArrays
   250: 000097e0     0 FUNC    GLOBAL DEFAULT  UND 
   251: 000097ec     0 FUNC    GLOBAL DEFAULT  UND hi_egl_setup
   252: 0000b13c   152 FUNC    GLOBAL DEFAULT   12 _Z10SetOrtho2Dv
   253: 00014590  4096 OBJECT  GLOBAL DEFAULT   23 _ZN13BitmappedFont20m_tex
   254: 000155a4     4 OBJECT  GLOBAL DEFAULT   23 timer
   255: 000097f8     0 FUNC    GLOBAL DEFAULT  UND 
   256: 0000a3c0   148 FUNC    GLOBAL DEFAULT   12 _ZN4MeshD2Ev
   257: 000155ac     0 NOTYPE  GLOBAL DEFAULT  ABS _end
   258: 00009804     0 FUNC    GLOBAL DEFAULT  UND glBindBuffer
   259: 0000b8f0    28 FUNC    GLOBAL DEFAULT   12 _ZN7TextureD1Ev
   260: 0000a168    56 FUNC    GLOBAL DEFAULT   12 _ZN13BitmappedFont13Disab
   261: 00009810     0 FUNC    GLOBAL DEFAULT  UND 
   262: 0000b5c4   164 FUNC    GLOBAL DEFAULT   12 _ZN7Texture18FlipBitmapVe
   263: 0000981c     0 FUNC    GLOBAL DEFAULT  UND glVertexPointer
   264: 00009828     0 FUNC    GLOBAL DEFAULT  UND 
   265: 00009834     0 FUNC    GLOBAL DEFAULT  UND hi_egl_destroy
   266: 00009840     0 FUNC    GLOBAL DEFAULT  UND hi_egl_Init
   267: 0000984c     0 FUNC    GLOBAL DEFAULT  UND 
   268: 00009858     0 FUNC    GLOBAL DEFAULT  UND 
   269: 0001457c     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
   270: 0000a454  1472 FUNC    GLOBAL DEFAULT   12 _ZN4MeshC1EPKcb
   271: 00009f58     4 FUNC    GLOBAL DEFAULT   12 _ZN13BitmappedFontD1Ev
   272: 00009864     0 FUNC    GLOBAL DEFAULT  UND _Znwj
   273: 00000000     0 FUNC    GLOBAL DEFAULT  UND 
   274: 00009870     0 FUNC    GLOBAL DEFAULT  UND BCMUtil_Audio_Init
   275: 0000b90c    28 FUNC    GLOBAL DEFAULT   12 _ZN7TextureD2Ev
   276: 0000987c     0 FUNC    GLOBAL DEFAULT  UND 
   277: 000155a0     4 OBJECT  GLOBAL DEFAULT   23 meshTexture
   278: 00009888     0 FUNC    GLOBAL DEFAULT  UND glGenTextures
   279: 00009b9c   424 FUNC    GLOBAL DEFAULT   12 main
   280: 0000be38    64 FUNC    GLOBAL DEFAULT   12 _ZN5Timer11UpdateTimerEv
   281: 000094f0     0 FUNC    GLOBAL DEFAULT   10 _init
   282: 0000b928   592 FUNC    GLOBAL DEFAULT   12 _ZN7TextureC1EPKcjjjjiii

 

符号正常。

大小为:29150 byte.

 

 

1.3.2:
使用-ffunction-sections,-fdata-sections的动态库,且使用-Wl,--gc-sections.

编译后,大小为28902。

来自http://blog.sina.com.cn/s/blog_602f87700100t0t5.html

阅读(1917) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~