berkus / mclinker

Automatically exported from code.google.com/p/mclinker
Other
0 stars 0 forks source link

Support Itanium exception handling ABI #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is the reference.

http://sourcery.mentor.com/public/cxx-abi/abi-eh.html

Best regards,
Luba

Original issue reported on code.google.com by LubaTang on 30 Mar 2012 at 2:24

GoogleCodeExporter commented 9 years ago
According to http://sourceware.org/ml/binutils/2007-07/msg00066.html
Should we support --eh-frame-hdr option?

BTW, here is another reference: http://www.airs.com/blog/archives/166

Original comment by LubaTang on 16 May 2012 at 5:40

GoogleCodeExporter commented 9 years ago
A good paper summary C++ exception handling for IA-64
google "C++ exception handling for IA-64".

Original comment by LubaTang on 16 May 2012 at 9:17

GoogleCodeExporter commented 9 years ago
Here are GNU ld's options related to eh_frame

--eh-frame-hdr
Request creation of ".eh_frame_hdr" section and ELF "PT_GNU_EH_FRAME" segment 
header.

--no-ld-generated-unwind-info
Request creation of ".eh_frame" unwind info for linker generated code sections 
like PLT.  This option is on by default if linker generated unwind info is 
supported.

Original comment by LubaTang on 18 May 2012 at 3:08

GoogleCodeExporter commented 9 years ago
In gold, there is an invert option --ld-generated-unwind-info.

i386 and x86_64 generate eh_frame for PLT only if this option is turned on.
ARM of course has nothing about this option.
Mips does not use this option.

BTW, Peter, what is the section order of EH_FRAME?

Original comment by LubaTang on 18 May 2012 at 7:13

GoogleCodeExporter commented 9 years ago
Now mclinker can link .eh_frame and .gcc_except_table section correctly. And 
some c++ exception examples are also examined on x86 Android.

Original comment by pete.c...@gmail.com on 23 May 2012 at 5:58

GoogleCodeExporter commented 9 years ago
The section .eh_frame_hdr is needed to correctly handle throwing the exception 
on x86 Linux. (without --eh-frame-hdr, the gnu-ld generated executable will 
aborted while run into exception.) 
Following are the tasks to support .eh_frame_hdr for mclinker:

*done:
1. (luba) Identify .eh_frame as an special section kind and create EhFrame. 

*ongoing:
2. (diana) EhFrame, CIE and FDE - parse and record the input .eh_frames section.
3. (pete) create .eh_frame_hdr EhFrameHdr - emit the .eh_frame_hdr

*todo:
4. (pete) create segment GNU_EH_FRAME
5. (diana) (not neccessary) create ehframe data for PLT, support 
--ld-generated-unwind-info

Original comment by mysekki on 14 Jun 2012 at 3:15

GoogleCodeExporter commented 9 years ago
Fixed since commit 9dd1988039. And povray and xalancbmk in SPECCPU are verified 
on x86 linux.

Original comment by pete.c...@gmail.com on 22 Jun 2012 at 6:27