This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question regarding processing of .eh_frame sections during partial linking on elf64-ppc platforms
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "William H. Maddox III" <maddox at transmeta dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 1 Dec 2006 09:43:05 +1030
- Subject: Re: Question regarding processing of .eh_frame sections during partial linking on elf64-ppc platforms
- References: <456EBB09.60903@transmeta.com>
On Thu, Nov 30, 2006 at 03:05:45AM -0800, William H. Maddox III wrote:
> More generally, I am interested in other quirks of "ld -r" where the
> output of a partial link is of a form that could not arise as the
> direct output of gcc, g++, or gas.
I suppose I ought to have a stab at answering this too.
- you might see multiple local symbols with the same name.
- compilers (stupidly) don't put all code generated for linkonce
functions in linkonce sections (either .gnu.linkonce.* or ELF comdat
groups). The linker generally doesn't attempt to remove the unused
leftover bits in non-linkonce sections. Of course, this applies to
a final link too. Most notable in ELF debug sections. Some
targets have code in the linker to edit certain sections to remove
these leftover bits, eg. ppc64 edits .toc and .opd.
--
Alan Modra
IBM OzLabs - Linux Technology Centre