The latest version of Clang adds a section called "llvm_addrsig" that is not yet recognized by objcopy. The issue was originally reported in the WLLVM project at https://github.com/travitch/whole-program-llvm/issues/75#issuecomment-430638246 When compiling Coreutils using WLLVM, the following errors are displayed from objcopy. CCLD src/split CC src/stat.o objcopy: src/stkShpi9: failed to find link section for section 30 objcopy: src/stkShpi9: failed to find link section for section 30 Cheers, Robin
Please attach the input object file and specify the command line options, in one of the failing objcopy commands.
Example based on SQLite3: https://sqlite.org/2018/sqlite-amalgamation-3250200.zip u@x1 ~/D/p/y/0/f/l/sqlite-amalgamation-3250200> cat foo asdf u@x1 ~/D/p/y/0/f/l/sqlite-amalgamation-3250200> clang-7 -c shell.c u@x1 ~/D/p/y/0/f/l/sqlite-amalgamation-3250200> objcopy --add-section .llvm_bc=foo shell.o objcopy: stlck9zT: failed to find link section for section 17 objcopy: stlck9zT: failed to find link section for section 17
And these versions are used: u@x1 ~> clang --version clang version 7.0.0 (tags/RELEASE_700/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin u@x1 ~> objcopy --version GNU objcopy (GNU Binutils) 2.31.1 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty.
I asked for an **OBJECT** file, you know, the file that objcopy is operating on, not source files. That would be shell.o in this instance. I don't have clang-7 installed. If I build clang myself, the configure opions I use or those auto-detected might get me a compiler that doesn't reproduce the same object file.
Created attachment 11346 [details] Produced with clang-7 -c shell.c from SQLite3.
Testing a patch.
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ac85e67c053f1555def2c111962f4e68740794f9 commit ac85e67c053f1555def2c111962f4e68740794f9 Author: Alan Modra <amodra@gmail.com> Date: Sat Oct 20 00:02:17 2018 +1030 PR23788, objcopy: failed to find link section Symbol tables can change when a number of objcopy options are used. I figure string tables are similarly changeable. PR 23788 * elf.c (section_match): Don't require a size match for SHT_SYMTAB or SHT_STRTAB.
Fixed
The binutils-2_31-branch branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2e05e3e689f25b7b866c49435417b1ded33f7ac7 commit 2e05e3e689f25b7b866c49435417b1ded33f7ac7 Author: Alan Modra <amodra@gmail.com> Date: Sat Oct 20 00:02:17 2018 +1030 PR23788, objcopy: failed to find link section Symbol tables can change when a number of objcopy options are used. I figure string tables are similarly changeable. PR 23788 * elf.c (section_match): Don't require a size match for SHT_SYMTAB or SHT_STRTAB. (cherry picked from commit ac85e67c053f1555def2c111962f4e68740794f9)
Fixed! Helped me on - https://appmirror.net/games/action/grand-theft-auto-san-andreas-game/
This article is so helpful for me. I have follow the steps shared here. It was so beneficial for me. Thanks for sharing this useful tips which helped in fixing the issue easily. Hope to see more useful post. https://www.handsomegroup.net