search for: eh_fram

Displaying 20 results from an estimated 215 matches for "eh_fram".

Did you mean: eh_frame
2017 Oct 26
3
[RFC] Making .eh_frame more linker-friendly
...are vertices and relocations are edges). lld and GNU gold have yet another feature, ICF, to merge functions by contents to save more space. When we remove or merge a function, we want to eliminate its exception handling information as well. But that isn't very easy to do due to the format of .eh_frame. Here are reasons: 1. Linkers have to parse, split, eliminate exception handling information for dead functions, and then reconstruct an .eh_frame section. It is tedious, and it doesn't feel very much like a task that linkers have to do (linkers usually handle sections as opaque blobs and are...
2017 Nov 20
3
[RFC] Making .eh_frame more linker-friendly
>Keeping .eh_frame separated should still simplifies the linker because >until the last step of building .eh_frame and .eh_frame_hdr, we don't >really need to parse .eh_frame sections. So, if we have separate .eh_frame >sections on -ffunction-sections, all we have to do is (1) garbage-collect >sectio...
2017 Oct 26
4
[RFC] Making .eh_frame more linker-friendly
No I haven't. Thank you for the pointer. Looks like the problem of the inverted edges was discussed there. But I guess my bigger question is this: why do we still create one big .eh_frame even if -ffunction-sections is given? When the option is given, Clang creates .text, .rela.text and .gcc_exception_table sections for each function, but it still creates a monolithic .eh_frame that covers all function sections, which seems odd to me. On Thu, Oct 26, 2017 at 9:47 AM, Reid Kleckne...
2017 Nov 10
2
[RFC] Making .eh_frame more linker-friendly
> But if we still need to deal with CIEs and generate .eh_frame_hdr in a special way, > does it make sense to make this change to simplify only a small part of a linker? For huge C++ projects this could improve link time if GC is a bottleneck. It will also improve eh_frame_hdr build time because you don’t spend time on parsing garbage. However a linker wil...
2017 Oct 26
4
[RFC] Making .eh_frame more linker-friendly
Hi, There will be problems with eh_frame_hdr. Eh_frame_hdr is needed to use the binary search instead of the linear search. Having eh_frame per a function will cause no eh_frame_hdr or multiple eh_frame_hdr and will degrade search from binary to linear. As we create eh_frame_hdr in most cases there is no problem to filter out garbage eh_...
2017 Nov 10
2
[RFC] Making .eh_frame more linker-friendly
Hi Igor, > It sounds like the linker has to be aware of the .eh_frame section details to be able to generate .eh_frame_hdr and eliminate duplicate CIEs, right? Yes, a linker needs some details but not all of them. It needs to know sizes of records and initial locations (PC Begin) to find out which functions FDEs belong to. > So, is there any difference whether...
2014 Mar 20
3
[LLVMdev] So what's the deal with debug_frame V eh_frame
While comparing debug info between GCC and Clang I found a section that only Clang produces and GCC never produces: debug_frame. It seems (though I haven't verified this with absolute certainty) as though GCC just always uses eh_frame. LLVM on the other hand sometimes uses eh_frame and sometimes uses debug_frame. Here's an example: int f1(); int i = f1(); void func() { } Compiled with -fno-exceptions -g. The first two lines produce a global ctor. Clang is generous enough to flag the LLVM IR function for this global cto...
2014 Mar 20
2
[LLVMdev] So what's the deal with debug_frame V eh_frame
...at gmail.com> wrote: >> While comparing debug info between GCC and Clang I found a section >> that only Clang produces and GCC never produces: debug_frame. >> >> It seems (though I haven't verified this with absolute certainty) as >> though GCC just always uses eh_frame. LLVM on the other hand sometimes >> uses eh_frame and sometimes uses debug_frame. >> >> Here's an example: >> >> int f1(); >> int i = f1(); >> void func() { } >> >> Compiled with -fno-exceptions -g. >> >> The first two lines pr...
2018 Feb 06
3
[RFC] Add mergeable and eh_frame section pieces to map files and --print-gc/icf-sections reports
Hi, We’d like to propose an extension to both the map file and the print-gc/icf-sections output. This extension would be to report the pieces of .eh_frame and SHF_MERGE sections in these files somehow. Since all (or at least the majority) of the contents of these sections in the output come from inputs, it would be beneficial in trying to associate the output contents with where they came from, helping with debugging and analysis as required. Our pr...
2017 Nov 23
4
[RFC] Making .eh_frame more linker-friendly
I performed tests basing on first diff of https://reviews.llvm.org/D40352. (Creates .eh_frame for each .text.*, sets SHF_LINK_ORDER and .sh_link of created .eh_frame section to point to corresponding .text.) With use of GNU ld (GNU Binutils) 2.29.51.20171006 it reports errors when linking sample apps: ~/LLVM/Release/bin/clang++ test.cpp -ffunction-sections -o test.o /usr/local/bin/ld: .eh...
2013 Apr 27
2
[LLVMdev] LLVM creates unterminated ELF .eh_frame sections
Please look at the fragment of the hex dump of LLVM-created ELF showing the beginning and end of .eh_frame: .eh_frame begin 000297a0 14 00 00 00 00 00 00 00 01 7a 52 00 01 78 10 01 |.........zR..x..| 000297b0 1b 0c 07 08 90 01 00 00 18 00 00 00 1c 00 00 00 |................| <...skipped...> 0002cb00 00 00 00 00 0b 01 00 00 00 41 0e 10 86 02 43 0d |.........A....C.| 0002cb10 06 42 83 03...
2013 Feb 18
2
[LLVMdev] llvm-dwarfdump and eh_frame
On Feb 11, 2013, at 18:13, Eli Bendersky <eliben at google.com> wrote: > On Thu, Feb 7, 2013 at 2:50 PM, Erik Verbruggen <erikjv at me.com> wrote: >> Hi, >> >> I noticed that llvm-dwarfdump does not show any information about the eh_frame section. While DWARFContext::getDebugAranges explicitly tries to parse it, it fails because the DWARFContextInMemory constructor does not check for that specific section name. A fix would be to check wether the name is "debug_frame" or "eh_frame". If this is correct, should I s...
2017 Nov 21
2
[RFC] Making .eh_frame more linker-friendly
>Thank you for taking a look. I think that the answer depends on how much slower GNU linkers are with separate .eh_frame sections. If it is not too slow, it may make >sense to generate split .eh_frame sections unconditionally. Otherwise, we might want to add a new option so that clang doesn't produce split .eh_frame sections by >default. I'll start investigating the implementation and try to update/r...
2018 Feb 06
0
[RFC] Add mergeable and eh_frame section pieces to map files and --print-gc/icf-sections reports
It seems that showing eh_frame section pieces in the map file is useful, but I wonder what would be a concrete use case of the feature. Do you mind if you ask you to describe your plan if you have a use case in mind? On Tue, Feb 6, 2018 at 4:27 AM, James Henderson < jh7370.2008 at my.bristol.ac.uk> wrote: > Hi, >...
2014 Dec 16
5
[LLVMdev] interest in an .eh_frame parser in llvm?
Hi all, Our use case for LLVM requires us to parse the .eh_frame sections emitted by MCJIT (for callee-saved-register spill slots, amongst other things). Does it make sense to have an in-tree parser for .eh_frame, given that it will make such tasks a lot easier? -- Sanjoy
2013 Feb 07
2
[LLVMdev] llvm-dwarfdump and eh_frame
Hi, I noticed that llvm-dwarfdump does not show any information about the eh_frame section. While DWARFContext::getDebugAranges explicitly tries to parse it, it fails because the DWARFContextInMemory constructor does not check for that specific section name. A fix would be to check wether the name is "debug_frame" or "eh_frame". If this is correct, should I s...
2008 Aug 13
2
[LLVMdev] LLVM build problem
Checking out LLVM from svn and building, I get: llvm[2]: Linking Release executable ModuleMaker (without symbols) /usr/bin/ld: error in /home/aph/llvm/Release/lib/LLVMX86.o(.eh_frame); no .eh_fr ame_hdr table will be created. /usr/bin/ld: error in /home/aph/llvm/Release/lib/LLVMInterpreter.o(.eh_frame); n o .eh_frame_hdr table will be created. /usr/bin/ld: error in /home/aph/llvm/Release/lib/LLVMExecutionEngine.o(.eh_frame ); no .eh_frame_hdr table will be created. /usr/bin/ld...
2013 Feb 11
0
[LLVMdev] llvm-dwarfdump and eh_frame
On Thu, Feb 7, 2013 at 2:50 PM, Erik Verbruggen <erikjv at me.com> wrote: > Hi, > > I noticed that llvm-dwarfdump does not show any information about the eh_frame section. While DWARFContext::getDebugAranges explicitly tries to parse it, it fails because the DWARFContextInMemory constructor does not check for that specific section name. A fix would be to check wether the name is "debug_frame" or "eh_frame". If this is correct, should I s...
2017 Nov 29
2
[RFC] Making .eh_frame more linker-friendly
>> With GNU gold (GNU Binutils 2.29.51.20171006) 1.14 have an assert: >> ~/LLVM/Release/bin/clang++ test.cpp -ffunction-sections -o test.o >> /usr/local/bin/ld: internal error in layout_eh_frame_section, at >> .././../gold/object.cc:1309 >> It is that place: >> https://github.com/gittup/binutils/blob/gittup/gold/object.cc#L1372 >> Did not investigate it, but it looks it is place >> (https://sourceware.org/ml/binutils/2009-06/msg00097.html) >> mentioned...
2014 Dec 21
2
[LLVMdev] interest in an .eh_frame parser in llvm?
...hich produces human readable output and a bunch of lit tests to ensure it's not broken by other changes. In particular, we need to make sure that the in tree parser can parse the sections llvm itself is producing. p.s. One thing I think we need to be very careful to document is that this .eh_frame parser is version locked to the same version of llvm and is only guaranteed to parse output from that version of llvm. I'm not opposed to trying to be more generic, but I suspect that would involve a lot more work. > > On Mon, Dec 15, 2014 at 11:09 PM, Sanjoy Das > <sanjoy at...