On Fri, Oct 10, 2014 at 09:51:02AM -0700, Cary Coutant wrote:
> The linker already has a --strip-lto-sections option, and it's on by
> default. I'll approve a patch that modifies gold to recognize
> .gnu.offload_lto.* sections as part of --strip-lto-sections.
> 
> Really, though, you should be setting the SHF_EXCLUDE bit on these
> sections. Do that and no special-casing will be necessary.

For that I guess
lhd_begin_section
would need to replace:
  section = get_section (name, SECTION_DEBUG, NULL);
with:
  section = get_section (name, SECTION_DEBUG | SECTION_EXCLUDE, NULL);
either just for the .gnu.offload_lto prefixed section, or all.
The question is what will old assemblers and/or linkers do with that, and
if there are any that support linker plugins, but not SHF_EXCLUDE.

        Jakub

Reply via email to