gc sections and .eh_frame
Alan Modra
amodra@bigpond.net.au
Thu Jun 9 12:49:00 GMT 2005
More information about the Binutils mailing list
Thu Jun 9 12:49:00 GMT 2005
- Previous message (by thread): gc sections and .eh_frame
- Next message (by thread): gc sections and .eh_frame
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Jun 09, 2005 at 01:07:58PM +0100, Jonathan Larmour wrote: > Can I ask where the used .gcc_except_table.* sections _are_ meant to be > marked? I cannot see anywhere that _bfd_elf_discard_section_eh_frame does > it, for example. Why would .gcc_except_table.* get marked, but .rodata not > get marked for powerpc? I think Eric cheated, and put a KEEP in the linker script. As far as .eh_frame is concerned, the problem is that gcc doesn't emit eh info to uniquely named sections for each function when compiling with -ffunction-sections -fdata-sections. Instead, you get it all lumped into one section. Since ld's --gc-sections option works by looking at relocs on a section by section basis, if .eh_frame is kept, then all sections referred to by .eh_frame will be kept. And .eh_frame typically references function code sections.. Relocation section '.rela.eh_frame' at offset 0x1293c contains 15 entries: Offset Info Type Sym. Value Symbol's Name + Addend 00000012 0000b901 R_PPC_ADDR32 00000000 __gxx_personality_v0 + 0 00000024 00000801 R_PPC_ADDR32 00000000 .text._ZNSt8ios_base17_M_call_callbacksENS_5eventE + 0 0000002d 00000901 R_PPC_ADDR32 00000000 .rodata + 0 00000048 00000a01 R_PPC_ADDR32 00000000 .text._ZNSt8ios_base20_M_dispose_callbacksEv + 0 00000068 00000b01 R_PPC_ADDR32 00000000 .text._ZNSt8ios_baseD2Ev + 0 00000071 00000901 R_PPC_ADDR32 00000000 .rodata + 1d 00000088 00000c01 R_PPC_ADDR32 00000000 .text._ZNSt8ios_baseD1Ev + 0 00000091 00000901 R_PPC_ADDR32 00000000 .rodata + 2a 000000a8 00000d01 R_PPC_ADDR32 00000000 .text._ZNSt8ios_baseD0Ev + 0 000000b1 00000901 R_PPC_ADDR32 00000000 .rodata + 37 000000c8 00001001 R_PPC_ADDR32 00000000 .text._ZNSt8ios_base6xallocEv + 0 000000d1 00000901 R_PPC_ADDR32 00000000 .rodata + 48 000000e4 00001101 R_PPC_ADDR32 00000000 .text._ZNSt8ios_base17register_callbackEPFvNS_5eventERS_iEi + 0 0000010c 00001501 R_PPC_ADDR32 00000000 .text._ZNSt8ios_base13_M_grow_wordsEib + 0 00000115 00000901 R_PPC_ADDR32 00000000 .rodata + 5c -- Alan Modra IBM OzLabs - Linux Technology Centre
- Previous message (by thread): gc sections and .eh_frame
- Next message (by thread): gc sections and .eh_frame
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list