Re: [arm-gnu] holy sections, batman!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] holy sections, batman!



On Wed, 2010-04-21 at 12:18 -0400, Andrew Kohlsmith (mailing lists
account) wrote:
>         prog : {
>                 *(.init)
>                 *(.fini)
>                 *(.eh_frame)
>                 *(.init_array)
>                 *(.fini_array)
>                 *(.jcr)
>                 *(.text)
> 	        *(.text.*)
>                 *(.rodata)
>                 *(.rodata*)
>                 *(.glue_7)
>                 *(.glue_7t)
>         } >flash
> 

> What are all of these sections for?  The .text, .data and .bss sections I can 
> certainly understand.  How can I figure out what is using functions that 
> require the .init/fini stuff? What are .jcr, .eh_frame and .glue_7/7t for?

Good luck.  I asked that question once ...

> As I mentioned, my linker script is working fine, but I'm trying to understand 
> where some of these sections are coming from and if I can perhaps do something 
> to help reduce the code footprint (-Os works *wonders*, but looking for other 
> hints/tips.)

Have you played with these?

copts += -ffunction-sections
copts += -fdata-sections

ldopts += -Wl,-gc-sections

James.