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

See the CrossGCC FAQ for lots more information.


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: __EH_FRAME_BEGIN__ setup?


Kai Ruottu wrote:

Haven't really had time to answer earlier...

Toralf Lund wrote:

Kai Ruottu wrote:

Toralf Lund wrote:

With recent versions of gcc, apparently __EH_FRAME_BEGIN__ has to be defined in the linker script. What is it, and how am I supposed to initialise it.


Please use the premade linker scripts coming with newlib as models...


I checked those before I asked, obviously, but it's far from clear based on these what it all means, or where I ought to put the setup. The different linker scripts don't even put "eh frame" stuff in the same output section...


You must use ELF now because this __EH_FRAME_BEGIN__ neither the '.eh_frame'

Nope. It's COFF, all right. Well, maybe there could be weird things going on with the build, but the actual compiler generated quite definitely creates COFF objects, and everything included in libgcc etc. has COFF format, too.


section are not used with the COFF format at all...

Maybe the section is not supposed to be there, but I'm quite sure it is...



If you however are using 'm68k-coff', how on earth you can get these?

How would I know? I certainly didn't expect to get them...



In which modules this section is included? What if you try :

It's shows up here:


/usr/lib/gcc/m68k-coff/3.4.2/m68000/libgcc.a(unwind-dw2-fde.o)

The actual __EH_FRAME_BEGIN__ reference seems to come from file __main.o, also in libgcc.


objdump -h <the_modules> | grep eh_frame


for your startup (crt0.o), the C library (libc.a), the C++ library
(libstdc++.a), your own compiled modules etc., do some of them have this
extra section?

The above file is the *only* one that has an .eh_frame section, at least among the ones actually used in my build.



A quick check in my 'lib*.a' for 'm68k-coff' tools didn't show any instances
of this section meanwhile starting from the very base 'crtbegin.o/crtend.o'
(not used with the 'm68k-coff' format) startups, the '.eh_frame' section seems
to be present everywhere with the 'm68k-elf' format.


F:\usr\local\lib\gcc-lib\m68k-elf\3_1.1>m68k-elf-objdump -h crtbegin.o

[ ... ]





However there maybe once was a serious bug in the GCC's 'm68k-coff' target
configuration files and this section erroneously being added...


It is always recommended to have the GNU manuals and to search from them. In
this 'EH_FRAME' keyword search case the "GCC Internals" gave :

[ ... ]


What? RTFM?

But, actually the problem is often knowing where to search. Also, I daresay you should not to have to re-read the full manual to be able to figure out how to get things to work after upgrading the compiler, when it was quite all right with an earlier version; the "changes" documentation ought to include all the information needed. But it seems like it newer does with gcc... Or maybe I've missed some document or the other...

- Toralf



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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