From: Alan Modra <amodra@bigpond.net.au>
To: Jonathan Larmour <jifl@eCosCentric.com>
Cc: Eric Botcazou <ebotcazou@adacore.com>, binutils@sources.redhat.com
Subject: Re: gc sections and .eh_frame
Date: Thu, 09 Jun 2005 12:49:00 -0000 [thread overview]
Message-ID: <20050609124854.GD2677@bubble.grove.modra.org> (raw)
In-Reply-To: <42A8311E.5090402@eCosCentric.com>
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
next prev parent reply other threads:[~2005-06-09 12:49 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-07 17:48 Jonathan Larmour
2005-06-07 18:00 ` Eric Botcazou
2005-06-07 18:11 ` Jonathan Larmour
2005-06-08 2:09 ` Alan Modra
2005-06-08 11:13 ` Jonathan Larmour
2005-06-08 19:10 ` Richard Henderson
2005-06-08 19:29 ` Jonathan Larmour
2005-06-08 19:32 ` Richard Henderson
2005-06-08 21:36 ` Jonathan Larmour
2005-06-08 22:02 ` Richard Henderson
2005-06-09 10:33 ` Jonathan Larmour
2005-06-09 11:38 ` Eric Botcazou
2005-06-09 12:07 ` Jonathan Larmour
2005-06-09 12:49 ` Alan Modra [this message]
2005-06-09 13:02 ` Eric Botcazou
2005-06-09 13:50 ` Jonathan Larmour
2005-06-09 14:22 ` Eric Botcazou
2005-06-09 14:33 ` Jonathan Larmour
2005-06-10 4:23 ` Alan Modra
2005-06-10 6:46 ` Eric Botcazou
2005-06-10 11:49 ` Jonathan Larmour
2005-06-10 11:55 ` Eric Botcazou
2005-06-10 12:09 ` Alan Modra
2005-06-10 12:51 ` Jonathan Larmour
2005-06-10 13:44 ` Eric Botcazou
2005-06-10 14:26 ` Jonathan Larmour
2005-06-10 14:50 ` Eric Botcazou
2005-06-10 14:58 ` Jonathan Larmour
2005-06-10 15:13 ` Eric Botcazou
2005-06-22 11:46 ` Jonathan Larmour
2005-06-25 17:28 ` Alan Modra
2005-06-27 11:56 ` Eric Botcazou
2005-06-28 2:58 ` Alan Modra
2005-06-28 7:40 ` Eric Botcazou
2005-06-28 11:42 ` Alan Modra
2005-06-28 11:58 ` Eric Botcazou
2005-06-29 1:24 ` Alan Modra
2005-06-29 6:52 ` Eric Botcazou
2005-06-29 12:45 ` Jonathan Larmour
2005-06-29 13:54 ` Alan Modra
2005-06-29 22:31 ` Jonathan Larmour
2005-06-30 22:28 ` Alan Modra
2005-07-01 13:31 ` Jonathan Larmour
2005-07-04 4:50 ` Alan Modra
2005-07-04 10:55 ` Jonathan Larmour
2005-07-26 11:30 ` Alan Modra
2005-07-26 12:05 ` Alan Modra
2005-08-25 0:06 ` Jim Blandy
2005-08-25 0:48 ` Alan Modra
2005-06-10 13:35 ` Eric Botcazou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050609124854.GD2677@bubble.grove.modra.org \
--to=amodra@bigpond.net.au \
--cc=binutils@sources.redhat.com \
--cc=ebotcazou@adacore.com \
--cc=jifl@eCosCentric.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).