Re: Strange read for simple_object_elf_find_sections for .a file

2020-03-12 Thread Martin Liška
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) {

Strange read for simple_object_elf_find_sections for .a file

2020-03-12 Thread Martin Liška
Hi. I noticed a strange error during parsing of .gnu.lto_.lto section in LTO plugin: $ cat bss.c int global_zero; int global_one = 1; int main() { return 0; } $ gcc -flto bss.c -c $ gcc bss.o read version 9.0 while: $ ar r x.a bss.o ar: creating x.a $ gcc x.a read version 13617.13368 $ obj