PR lto/51916
* lto-object.c (LTO_SEGMENT_NAME): Define segment name.
(lto_obj_file_open): Use it.

Patrick, the changelog was referring to the wrong file and the wrong function. I've fixed it. I also inlined the segment name, as Ian had in the PR.

Richard Guenther approved the patch on the PR, so I am committing and closing the PR. The final version of the patch is attached.

Thanks for fixing this!
        PR lto/51916
        * lto-wrapper.c (run_gcc): Pass the LTO section name to
        simple_object_start_read.

Index: lto-wrapper.c
===================================================================
--- lto-wrapper.c       (revision 183432)
+++ lto-wrapper.c       (working copy)
@@ -479,7 +479,8 @@ run_gcc (unsigned argc, char *argv[])
       fd = open (argv[i], O_RDONLY);
       if (fd == -1)
        continue;
-      sobj = simple_object_start_read (fd, file_offset, NULL, &errmsg, &err);
+      sobj = simple_object_start_read (fd, file_offset, "__GNU_LTO", 
+                                      &errmsg, &err);
       if (!sobj)
        {
          close (fd);

Reply via email to