> On Tue, May 8, 2018 at 8:05 AM, Jan Hubicka <hubi...@ucw.cz> wrote: > > Hi, > > for incremental linking of LTO objects we need to copy debug sections from > > source object files into destination without renaming them from > > .gnu.debuglto > > into the standard debug section (because they will again be LTO debug > > section > > in the resulting object file). > > > > I have discussed this with Richard on IRC and I hope it is fine to change > > the > > API here becuase lto-wrapper is the only user of this function. I will send > > lto-wrapper support in separate patch. > > > > I have lto-bootstrapped/regtested the whole incremental linking patchet on > > x86-64-linux with libbackend being incrementaly linked and also experimented > > with extra testcases and tested that debugging works on resulting cc1 > > binary. > > OK? > > > > Honza > > > > * simple-object.h (simple_object_copy_lto_debug_sections): Add > > rename > > parameter. > > * simple-object.c (handle_lto_debug_sections): Add rename parameter. > > (handle_lto_debug_sections_rename): New function. > > (handle_lto_debug_sections_norename): New function. > > (simple_object_copy_lto_debug_sections): Add rename parameter. > > Index: include/simple-object.h > > =================================================================== > > --- include/simple-object.h (revision 260042) > > +++ include/simple-object.h (working copy) > > @@ -198,12 +198,15 @@ > > simple_object_release_write (simple_object_write *); > > > > /* Copy LTO debug sections from SRC_OBJECT to DEST. > > + If RENAME is true, rename LTO debug section into debug section (i.e. > > + when producing final binary) and if it is false, keep the sections with > > + original names (when incrementally linking). > > If an error occurs, return the errno value in ERR and an error string. > > */ > > > > extern const char * > > simple_object_copy_lto_debug_sections (simple_object_read *src_object, > > const char *dest, > > - int *err); > > + int *err, int rename); > > > > #ifdef __cplusplus > > } > > This part is missing from r260956: > > https://gcc.gnu.org/ml/gcc-cvs/2018-05/msg01177.html
I have managed to commit partially, it should be fixed now. My apologizes for this! Honza > > -- > H.J.