llvm/tools
Jordan Rupprecht 7cc02fd898 [llvm-objcopy] Fix SHT_GROUP ordering.
Summary:
When llvm-objcopy sorts sections during finalization, it only sorts based on the offset, which can cause the group section to come after the sections it contains. This causes link failures when using gold to link objects created by llvm-objcopy.

Fix this for now by copying GNU objcopy's behavior of placing SHT_GROUP sections first. In the future, we may want to remove this sorting entirely to more closely preserve the input file layout.

This fixes https://bugs.llvm.org/show_bug.cgi?id=42052.

Reviewers: jakehehrlich, jhenderson, MaskRay, espindola, alexshap

Reviewed By: MaskRay

Subscribers: phuongtrang148993, emaste, arichardson, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62620

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362973 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-10 18:35:01 +00:00
..
bugpoint [Bugpoint] fix another use-after-move. NFC 2019-05-31 21:36:21 +00:00
bugpoint-passes Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
dsymutil [dsymutil] Use the number of threads specified. 2019-06-07 17:35:19 +00:00
gold Reland "[Remarks] Add -foptimization-record-passes to filter remark emission" 2019-03-12 21:22:27 +00:00
llc [CodeGen] Generic Hardware Loop Support 2019-06-07 07:35:30 +00:00
lli [ORC] Guarantee unique JITDylib names in lli, add usage notes to createJITDylib. 2019-05-21 22:07:53 +00:00
llvm-ar [llvm-ar] Create thin archives with MRI scripts 2019-06-06 13:19:50 +00:00
llvm-as Make llvm-as --help great again 2019-05-27 08:24:06 +00:00
llvm-as-fuzzer Fix some include order and file headers issues. NFC 2019-02-21 07:42:31 +00:00
llvm-bcanalyzer Use llvm::stable_sort. NFC 2019-04-22 15:53:43 +00:00
llvm-c-test Fix BUILD_SHARED_LIBS builds after r361567 2019-05-24 02:15:27 +00:00
llvm-cat Simplify llvm-cat help 2019-05-13 11:29:25 +00:00
llvm-cfi-verify Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef> 2019-05-16 13:24:04 +00:00
llvm-config [cmake] Add function for building native tool 2019-04-02 15:58:03 +00:00
llvm-cov Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef> 2019-05-16 13:24:04 +00:00
llvm-cvtres lld-link: Add /force:multipleres extension to make dupe resource diag non-fatal 2019-05-02 21:21:55 +00:00
llvm-cxxdump Break false dependencies on target libraries 2019-05-23 23:02:56 +00:00
llvm-cxxfilt [llvm-cxxfilt] Fix -Wshadow warning. NFCI. 2019-05-09 15:58:16 +00:00
llvm-cxxmap Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-diff Fix some include order and file headers issues. NFC 2019-02-21 07:42:31 +00:00
llvm-dis Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-dwarfdump [dwarfdump] Add flag to limit the number of parents DIEs 2019-05-24 21:11:28 +00:00
llvm-dwp Fix BUILD_SHARED_LIBS builds after r361567 2019-05-24 02:15:27 +00:00
llvm-elfabi Fix some include order and file headers issues. NFC 2019-02-21 07:42:31 +00:00
llvm-exegesis fix a typo unavaliable=>unavailable 2019-06-08 15:07:55 +00:00
llvm-extract [llvm-extract] Expose the group extraction feature of the BlockExtractor 2019-04-29 16:14:03 +00:00
llvm-go [tests][go]Add -stdlib=libc++ to build GO test if LLVM is built with libc++ 2019-05-16 13:32:55 +00:00
llvm-isel-fuzzer Fix file header issues in fuzzers. NFC 2019-02-21 07:57:14 +00:00
llvm-itanium-demangle-fuzzer Fix file header issues in fuzzers. NFC 2019-02-21 07:57:14 +00:00
llvm-jitlink [JITLink] Add a test for zero-filled content. 2019-05-12 22:26:33 +00:00
llvm-jitlistener Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-link Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-lipo [llvm-lipo] Drop unneeded braces. NFC 2019-06-07 20:52:17 +00:00
llvm-lto Fix BUILD_SHARED_LIBS builds after r361567 2019-05-24 02:15:27 +00:00
llvm-lto2 Fix BUILD_SHARED_LIBS builds after r361567 2019-05-24 02:15:27 +00:00
llvm-mc [DWARF] Make -g with empty assembler source work better. 2019-03-01 20:58:04 +00:00
llvm-mc-assemble-fuzzer Fix some include order and file headers issues. NFC 2019-02-21 07:42:31 +00:00
llvm-mc-disassemble-fuzzer Fix file header issues in fuzzers. NFC 2019-02-21 07:57:14 +00:00
llvm-mca [llvm-mca] Enable bottleneck analysis when flag -all-views is specified. 2019-06-10 16:56:25 +00:00
llvm-microsoft-demangle-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-modextract Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-mt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-nm [llvm-nm] Fix Bug 41353 - unique symbols printed as D instead of u 2019-05-24 04:02:05 +00:00
llvm-objcopy [llvm-objcopy] Fix SHT_GROUP ordering. 2019-06-10 18:35:01 +00:00
llvm-objdump [llvm-objdump] Fix Bugzilla ID 41862 to support checking addresses of disassembled object 2019-06-07 21:49:26 +00:00
llvm-opt-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-opt-report [CommandLineParser] Add DefaultOption flag 2019-04-15 17:18:10 +00:00
llvm-pdbutil [PDB] Copy inlinee lines records into the PDB 2019-06-03 18:15:38 +00:00
llvm-profdata [llvm-profdata] Add overlap command to compute similarity b/w two profile files 2019-04-30 21:19:12 +00:00
llvm-rc Fix typos: (re)?sor?uce -> (re)?source 2019-04-26 05:56:23 +00:00
llvm-readobj [llvm-readobj/llvm-readelf] - Don't fail to dump the object if .dynsym has broken sh_link field. 2019-06-10 14:23:46 +00:00
llvm-rtdyld Break false dependencies on target libraries 2019-05-23 23:02:56 +00:00
llvm-shlib [llvm-shlib] Fix cross-compilation for LLVM-C 2019-04-02 15:58:05 +00:00
llvm-size Sanitize llvm-size help 2019-06-05 10:32:28 +00:00
llvm-special-case-list-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-split Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-stress Avoid cppcheck operator precedence warnings. NFCI. 2019-05-03 13:50:38 +00:00
llvm-strings Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-symbolizer [llvm-symbolizer] Flush output on bad input 2019-06-04 15:34:58 +00:00
llvm-undname llvm-undname: Add a -raw-file flag to pass a raw buffer to microsoftDemangle 2019-04-16 12:51:40 +00:00
llvm-xray Break false dependencies on target libraries 2019-05-23 23:02:56 +00:00
llvm-yaml-numeric-parser-fuzzer Fix file header issues in fuzzers. NFC 2019-02-21 07:57:14 +00:00
lto Break false dependencies on target libraries 2019-05-23 23:02:56 +00:00
msbuild vs integration: vs2019 support 2019-04-30 12:41:33 +00:00
obj2yaml [yaml2obj/obj2yaml] - Make RawContentSection::Content and RawContentSection::Size optional 2019-06-10 12:43:18 +00:00
opt [CodeGen] Generic Hardware Loop Support 2019-06-07 07:35:30 +00:00
opt-viewer [opt-viewer] Teach optrecord.py about !Failure tags 2019-03-27 18:35:04 +00:00
remarks-shlib Reland "[Remarks] Add a new Remark / RemarkParser abstraction" 2019-03-19 21:11:07 +00:00
sancov Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef> 2019-05-16 13:24:04 +00:00
sanstats [DebugInfo] add SectionedAddress to DebugInfo interfaces. 2019-02-27 13:17:36 +00:00
verify-uselistorder Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
xcode-toolchain [CMake] Use LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES 2018-10-15 21:20:02 +00:00
yaml2obj [yaml2obj/obj2yaml] - Make RawContentSection::Content and RawContentSection::Size optional 2019-06-10 12:43:18 +00:00
CMakeLists.txt Fix most of LLVM's tests with LLVM_ENABLE_PIC=OFF 2019-01-16 20:44:36 +00:00
LLVMBuild.txt [JITLink] Add llvm-jitlink subdirectory to tools/LLVMBuild.txt 2019-04-20 17:58:29 +00:00