The answer is simple:

diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index fbe2c6885f0..83f1ac38d37 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -1033,6 +1033,7 @@ static int
 process_lto_section (void *data, const char *name, off_t offset, off_t len)
 {
   struct plugin_objfile *obj = (struct plugin_objfile *)data;
+  offset += obj->file->offset;
   if (strncmp (name, LTO_LTO_PREFIX, LTO_LTO_PREFIX_LEN) == 0)
     {
       if (offset != lseek (obj->file->fd, offset, SEEK_SET))

Sorry for the noise.
Martin

Reply via email to