This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gc sections and .eh_frame


Richard Henderson wrote:
On Wed, Jun 08, 2005 at 12:14:07PM +0100, Jonathan Larmour wrote:

From a brief foray into the GCC sources, I believe the use of gcc_except_table depends on the existence of TARGET_ASM_NAMED_SECTION, which is not defined for any powerpc other than rs6000-xcoff.


You're confused. All elf have it.

Fair enough, it was only a belief, and it's easy for GCC to confuse me ;). But empirically, powerpc-eabi does put exception stuff referenced from .eh_frame into .rodata:


dargo:/tmp$ cat >e.cxx
extern void foo(void);

int main()
{
    try {
        foo();
    } catch(...) {
        return 1;
    };
    return 0;
}

dargo:/tmp$ powerpc-eabi-g++ -c e.cxx
dargo:/tmp$ powerpc-eabi-objdump -h e.o

e.o: file format elf32-powerpc

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000060  00000000  00000000  00000034  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data         00000000  00000000  00000000  00000094  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000000  00000000  00000000  00000094  2**0
                  ALLOC
  3 .rodata       00000014  00000000  00000000  00000094  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .eh_frame     00000040  00000000  00000000  000000a8  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  5 .comment      00000020  00000000  00000000  000000e8  2**0
                  CONTENTS, READONLY

The .rodata there contains the exception info referenced by .eh_frame and there is no .gcc_except_table section present at all.

This has been the case for years for powerpc-eabi, I don't know how long.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]