This is the mail archive of the
mailing list for the binutils project.
[Gold linker] Incremental linking in C++
- From: Jim Stevens <jstevensvalk at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 4 Nov 2016 09:44:29 -0500
- Subject: [Gold linker] Incremental linking in C++
- Authentication-results: sourceware.org; auth=none
I would like to use incremental linking in my C++ project.
However, I understand from this report:
...that incremental linking disables eh_frame_hdr generation.
Naturally, the inability to catch any thrown exception makes using
this functionality for C++ development virtually impossible.
I was wondering if there is any planned effort to make this
functionality work? Someone in the report was asking for help in
implementing it on his own, would it be possible to review what the
necessary steps are?
P.S. I also hit a crash in this code in incremental.cc.
2267 // Get the name of a section. This returns the name of the output
2268 // section, because we don't usually track the names of the input
2269 // sections.
2271 template<int size, bool big_endian>
2273 Sized_relobj_incr<size, big_endian>::do_section_name(unsigned int
2275 const Output_sections& out_sections(this->output_sections());
2276 const Output_section* os = out_sections[shndx];
2277 if (os == NULL)
2278 return NULL;
2279 return os->name();
Returning NULL on line 2278 quickly crashes because std::string makes
an implicit construction from the null pointer.