summaryrefslogtreecommitdiffstats
path: root/lld
Commit message (Collapse)AuthorAgeFilesLines
...
* [ELF] Delete an unused special rule from isStaticLinkTimeConstant. NFCFangrui Song2020-01-081-10/+0
| | | | | | | | | | | | | | | | | | Weak undefined symbols are preemptible after D71794. if (sym.isPreemptible) return false; if (!config->isPic) return true; // isPic means includeInDynsym is true after D71794. ... // We can delete this if because it can never be true. if (sym.isUndefWeak) return true; Differential Revision: https://reviews.llvm.org/D71795
* [ELF] Don't special case weak symbols for pie with no shared objectsFangrui Song2020-01-083-40/+7
| | | | | | | | | | | | | | | | | | | | | | D59275 added the following clause to Symbol::includeInDynsym() if (isUndefWeak() && Config->Pie && SharedFiles.empty()) return false; D59549 explored the possibility to generalize it for -no-pie. GNU ld's rules are architecture dependent and partly controlled by -z {,no-}dynamic-undefined-weak. Our attempts to mimic its rules are actually half-baked and don't provide perceivable benefits (it can save a few more weak undefined symbols in .dynsym in a -static-pie executable). Let's just delete the rule for simplicity. We will expect cosmetic inconsistencies with ld.bfd in certain -static-pie scenarios. This permits a simplification in D71795. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D71794
* [LLD][ELF][AArch64] Do not use thunk for undefined weak symbol.Peter Smith2020-01-073-28/+33
| | | | | | | | | | | | | | | In AArch64 a branch to an undefined weak symbol that does not have a PLT entry should resolve to the next instruction. The thunk generation code can prevent this from happening as a range extension thunk can be generated if the branch is sufficiently far away from 0, the value of an undefined weak symbol. The fix is taken from the Arm implementation of needsThunk(), we prevent a thunk from being generated to an undefined weak symbol. fixes pr44451 Differential Revision: https://reviews.llvm.org/D72267
* [lld] Fix trivial typos in commentsKazuaki Ishizaki2020-01-0631-46/+46
| | | | | | Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D72196
* [llvm-readelf] Print EI_ABIVERSION as decimal instead of hexadecimalFangrui Song2020-01-061-1/+1
| | | | | | | | This matches GNU readelf and llvm-readobj. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D72234
* [ELF] Drop const qualifier to fix -Wrange-loop-analysis. NFCFangrui Song2020-01-041-1/+1
| | | | | | | | | | | | | | | | ``` lld/ELF/Relocations.cpp:1622:56: warning: loop variable 'ts' of type 'const std::pair<ThunkSection *, uint32_t>' (aka 'const pair<lld::elf::ThunkSection *, unsigned int>') creates a copy from type 'const std::pair<ThunkSection *, uint32_t>' [-Wrange-loop-analysis] for (const std::pair<ThunkSection *, uint32_t> ts : isd->thunkSections) ``` Drop const qualifier to fix -Wrange-loop-analysis. We can make -Wrange-loop-analysis warnings (DiagnoseForRangeConstVariableCopies) on `const A` more permissive on more types (e.g. POD -> trivially copyable), unfortunately it will not make std::pair good, because `constexpr pair& operator=(const pair& p);` is unfortunately user-defined. Reviewed By: Mordante Differential Revision: https://reviews.llvm.org/D72211
* [LLD] [COFF] Don't error out on duplicate absolute symbols with the same valueMartin Storsjö2020-01-044-3/+31
| | | | | | | | | Both MS link.exe and GNU ld.bfd handle it this way; one can have multiple object files defining the same absolute symbols, as long as it defines it to the same value. But if there are multiple absolute symbols with differing values, it is treated as an error. Differential Revision: https://reviews.llvm.org/D71981
* [test][ELF] Use CHECK-NEXT to properly verify error messagesJames Henderson2020-01-031-34/+36
| | | | | | Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D72092
* [PDB] Print the most redundant type record indices with /summaryReid Kleckner2020-01-022-2/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I used this information to motivate splitting up the Intrinsic::ID enum (5d986953c8b917bacfaa1f800fc1e242559f76be) and adding a key method to clang::Sema (586f65d31f32ca6bc8cfdb8a4f61bee5057bf6c8) which saved a fair amount of object file size. Example output for clang.pdb: Top 10 types responsible for the most TPI input bytes: index total bytes count size 0x3890: 8,671,220 = 1,805 * 4,804 0xE13BE: 5,634,720 = 252 * 22,360 0x6874C: 5,181,600 = 408 * 12,700 0x2A1F: 4,520,528 = 1,574 * 2,872 0x64BFF: 4,024,020 = 469 * 8,580 0x1123: 4,012,020 = 2,157 * 1,860 0x6952: 3,753,792 = 912 * 4,116 0xC16F: 3,630,888 = 633 * 5,736 0x69DD: 3,601,160 = 985 * 3,656 0x678D: 3,577,904 = 319 * 11,216 In this case, we can see that record 0x3890 is responsible for ~8MB of total object file size for objects in clang. The user can then use llvm-pdbutil to find out what the record is: $ llvm-pdbutil dump -types -type-index 0x3890 Types (TPI Stream) ============================================================ Showing 1 records. 0x3890 | LF_FIELDLIST [size = 4804] - LF_STMEMBER [name = `WORDTYPE_MAX`, type = 0x1001, attrs = public] - LF_MEMBER [name = `U`, Type = 0x37F0, offset = 0, attrs = private] - LF_MEMBER [name = `BitWidth`, Type = 0x0075 (unsigned), offset = 8, attrs = private] - LF_METHOD [name = `APInt`, # overloads = 8, overload list = 0x3805] ... In this case, we can see that these are members of the APInt class, which is emitted in 1805 object files. The next largest type is ASTContext: $ llvm-pdbutil dump -types -type-index 0xE13BE bin/clang.pdb 0xE13BE | LF_FIELDLIST [size = 22360] - LF_BCLASS type = 0x653EA, offset = 0, attrs = public - LF_MEMBER [name = `Types`, Type = 0x653EB, offset = 8, attrs = private] - LF_MEMBER [name = `ExtQualNodes`, Type = 0x653EC, offset = 24, attrs = private] - LF_MEMBER [name = `ComplexTypes`, Type = 0x653ED, offset = 48, attrs = private] - LF_MEMBER [name = `PointerTypes`, Type = 0x653EE, offset = 72, attrs = private] ... ASTContext only appears 252 times, but the list of members is long, and must be repeated everywhere it is used. This was the output before I split Intrinsic::ID: Top 10 types responsible for the most TPI input: 0x686C: 69,823,920 = 1,070 * 65,256 0x686D: 69,819,640 = 1,070 * 65,252 0x686E: 69,819,640 = 1,070 * 65,252 0x686B: 16,371,000 = 1,070 * 15,300 ... These records were all lists of intrinsic enums. Reviewers: MaskRay, ruiu Subscribers: mgrang, zturner, thakis, hans, akhuang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71437
* build: reduce CMake handling for zlibSaleem Abdulrasool2020-01-022-11/+2
| | | | | | | | | | | | | Rather than handling zlib handling manually, use `find_package` from CMake to find zlib properly. Use this to normalize the `LLVM_ENABLE_ZLIB`, `HAVE_ZLIB`, `HAVE_ZLIB_H`. Furthermore, require zlib if `LLVM_ENABLE_ZLIB` is set to `YES`, which requires the distributor to explicitly select whether zlib is enabled or not. This simplifies the CMake handling and usage in the rest of the tooling. This restores 68a235d07f9e7049c7eb0c8091f37e385327ac28, e6c7ed6d2164a0659fd9f6ee44f1375d301e3cad. The problem with the windows bot is a need for clearing the cache.
* [ELF][Hexagon][test] Use llvm-readobj to check relocations. NFCFangrui Song2020-01-021-3/+8
| | | | | | Reviewed By: sidneym Differential Revision: https://reviews.llvm.org/D72093
* Add TPREL relocation support to HexagonSid Manning2020-01-023-0/+72
| | | | Differential Revision: https://reviews.llvm.org/D71069
* [test][ELF] Verify debug line corruption messages are printed onceJames Henderson2020-01-022-9/+30
| | | | | | | | | | | | | LLD warns if it encounters malformed debug data when parsing line information for an undefined reference. We only want to warn once. This patch adds additional checking to make sure the warnings are printed only once, both for variables within the same program and variables in later line programs. Reviewed by: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D71759
* Revert "build: reduce CMake handling for zlib"James Henderson2020-01-022-2/+11
| | | | | | | This reverts commit 68a235d07f9e7049c7eb0c8091f37e385327ac28. This commit broke the clang-x64-windows-msvc build bot and a follow-up commit did not fix it. Reverting to fix the bot.
* build: reduce CMake handling for zlibSaleem Abdulrasool2020-01-012-11/+2
| | | | | | | | | Rather than handling zlib handling manually, use `find_package` from CMake to find zlib properly. Use this to normalize the `LLVM_ENABLE_ZLIB`, `HAVE_ZLIB`, `HAVE_ZLIB_H`. Furthermore, require zlib if `LLVM_ENABLE_ZLIB` is set to `YES`, which requires the distributor to explicitly select whether zlib is enabled or not. This simplifies the CMake handling and usage in the rest of the tooling.
* [lld] Fix -Wrange-loop-analysis warningsFangrui Song2020-01-015-14/+5
| | | | | | | | | | One instance looks like a false positive: lld/ELF/Relocations.cpp:1622:14: note: use reference type 'const std::pair<ThunkSection *, uint32_t> &' (aka 'cons t pair<lld::elf::ThunkSection *, unsigned int> &') to prevent copying for (const std::pair<ThunkSection *, uint32_t> ts : isd->thunkSections) It is not changed in this commit.
* [ELF][RISCV][test] Test absolute/PC-relative/branch relocations to undefined ↵Fangrui Song2019-12-311-0/+79
| | | | weak symbols
* [ELF][RISCV] Improve error message for unknown relocationsFangrui Song2019-12-311-16/+15
| | | | Like rLLD354040.
* [ELF][PPC64] Improve "call lacks nop" diagnostic and make it compatible with ↵Fangrui Song2019-12-295-5/+20
| | | | | | | | | | | | | | | | GCC<5.5 and GCC<6.4 GCC before r245813 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79439) did not emit nop after b/bl. This can happen with recursive calls. r245813 was back ported to GCC 5.5 and GCC 6.4. This is common, for example, libstdc++.a(locale.o) shipped with GCC 4.9 and many objects in netlib lapack can cause lld to error. gold allows such calls to the same section. Our __plt_foo symbol's `section` field is used for ThunkSection, so we can't implement a similar loosen rule easily. But we can make use of its `file` field which is currently NULL. Differential Revision: https://reviews.llvm.org/D71639
* [ELF][PPC32] Implement IPLT code sequence for non-preemptible IFUNCFangrui Song2019-12-295-24/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to D71509 (EM_PPC64), on EM_PPC, the IPLT code sequence should be similar to a PLT call stub. Unlike EM_PPC64, EM_PPC -msecure-plt has small/large PIC model differences. * -fpic/-fpie: R_PPC_PLTREL24 r_addend=0. The call stub loads an address relative to `_GLOBAL_OFFSET_TABLE_`. * -fPIC/-fPIE: R_PPC_PLTREL24 r_addend=0x8000. (A partial linked object file may have an addend larger than 0x8000.) The call stub loads an address relative to .got2+0x8000. Just assume large PIC model for now. This patch makes: // clang -fuse-ld=lld -msecure-plt -fno-pie -no-pie a.c // clang -fuse-ld=lld -msecure-plt -fPIE -pie a.c #include <stdio.h> static void impl(void) { puts("meow"); } void thefunc(void) __attribute__((ifunc("resolver"))); void *resolver(void) { return &impl; } int main(void) { thefunc(); void (*theptr)(void) = &thefunc; theptr(); } work on Linux glibc. -fpie will crash because the compiler and the linker do not agree on the value which r30 stores (_GLOBAL_OFFSET_TABLE_ vs .got2+0x8000). Differential Revision: https://reviews.llvm.org/D71621
* [ELF][PPC64] Implement IPLT code sequence for non-preemptible IFUNCFangrui Song2019-12-295-33/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-preemptible IFUNC are placed in in.iplt (.glink on EM_PPC64). If there is a non-GOT non-PLT relocation, for pointer equality, we change the type of the symbol from STT_IFUNC and STT_FUNC and bind it to the .glink entry. On EM_386, EM_X86_64, EM_ARM, and EM_AARCH64, the PLT code sequence loads the address from its associated .got.plt slot. An IPLT also has an associated .got.plt slot and can use the same code sequence. On EM_PPC64, the PLT code sequence is actually a bl instruction in .glink . It jumps to `__glink_PLTresolve` (the PLT header). and `__glink_PLTresolve` computes the .plt slot (relocated by R_PPC64_JUMP_SLOT). An IPLT does not have an associated R_PPC64_JUMP_SLOT, so we cannot use `bl` in .iplt . Instead, create a call stub which has a similar code sequence as PPC64PltCallStub. We don't save the TOC pointer, so such scenarios will not work: a function pointer to a non-preemptible ifunc, which resolves to a function defined in another DSO. This is the restriction described by https://sourceware.org/glibc/wiki/GNU_IFUNC (though on many architectures it works in practice): Requirement (a): Resolver must be defined in the same translation unit as the implementations. If an ifunc is taken address but not called, technically we don't need an entry for it, but we currently do that. This patch makes // clang -fuse-ld=lld -fno-pie -no-pie a.c // clang -fuse-ld=lld -fPIE -pie a.c #include <stdio.h> static void impl(void) { puts("meow"); } void thefunc(void) __attribute__((ifunc("resolver"))); void *resolver(void) { return &impl; } int main(void) { thefunc(); void (*theptr)(void) = &thefunc; theptr(); } work on Linux glibc and FreeBSD. Calling a function pointer pointing to a Non-preemptible IFUNC never worked before. Differential Revision: https://reviews.llvm.org/D71509
* lld: Remove explicit copy ops from AssociatedIterator, relying on implicit ↵David Blaikie2019-12-271-5/+0
| | | | operators
* [ELF] Improve the condition to create .interpFangrui Song2019-12-273-10/+8
| | | | | | | | | | | | | | | This restores commit 1417558e4a61794347c6bfbafaff7cd96985b2c3 and its follow-up, reverted by commit c3dbd782f1e0578c7ebc342f2e92f54d9644cff7. After this commit: clang -fuse-ld=bfd -no-pie -nostdlib a.c => .interp not created clang -fuse-ld=bfd -pie -fPIE -nostdlib a.c => .interp created clang -fuse-ld=gold -no-pie -nostdlib a.c => .interp not created clang -fuse-ld=gold -pie -fPIE -nostdlib a.c => .interp created clang -fuse-ld=lld -no-pie -nostdlib a.c => .interp created clang -fuse-ld=lld -pie -fPIE -nostdlib a.c => .interp created
* Revert "[ELF] Improve the condition to create .interp"Reid Kleckner2019-12-273-8/+10
| | | | | | | | This reverts commit 1417558e4a61794347c6bfbafaff7cd96985b2c3. Also reverts commit 019a92bb2832447092bb5c1faf9d03bb03b8c9c8. This causes check-sanitizer to fail. The "-Nolib" variant of the test crashes on startup in the loader.
* [ELF][test] Fix dynamic-linker.sFangrui Song2019-12-261-2/+2
|
* [ELF] Improve the condition to create .interpFangrui Song2019-12-263-8/+6
| | | | | | | | | | | | | | | | | Similar to rL362355, but with the `!config->shared` guard. (1) {gcc,clang} -fuse-ld=bfd -pie -fPIE -nostdlib a.c => .interp created (2) {gcc,clang} -fuse-ld=lld -pie -fPIE -nostdlib a.c => .interp not created (3) {gcc,clang} -fuse-ld=lld -pie -fPIE -nostdlib a.c a.so => .interp created The inconsistency of (2) is due to the condition `!Config->SharedFiles.empty()`. To make lld behave more like ld.bfd, we could change the condition to: config->hasDynSymTab && !config->dynamicLinker.empty() && script->needsInterpSection(); However, that would bring another inconsistency as can be observed with: (4) {gcc,clang} -fuse-ld=bfd -no-pie -nostdlib a.c => .interp not created
* [ELF] Support input section description .gnu.version* in /DISCARD/Fangrui Song2019-12-262-6/+53
| | | | | | | | | | | | | | Linux powerpc discards `*(.gnu.version*)` (arch/powerpc/kernel/vmlinux.lds.S) to suppress --orphan-handling=warn warnings in the -pie output `.tmp_vmlinux1` The support is simple. Just add isLive() to: 1) Fix an assertion in SectionBase::getPartition() called by VersionTableSection::isNeeded(). 2) Suppress DT_VERSYM, DT_VERDEF, DT_VERNEED and DT_VERNEEDNUM, if the relevant section is discarded. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D71819
* [llvm-nm] Display STT_GNU_IFUNC as 'i'Fangrui Song2019-12-251-2/+2
| | | | | | Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D71803
* Migrate function attribute "no-frame-pointer-elim"="false" to ↵Fangrui Song2019-12-245-8/+8
| | | | "frame-pointer"="none" as cleanups after D56351
* Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" ↵Fangrui Song2019-12-242-2/+2
| | | | as cleanups after D56351
* [ELF] Don't suggest an alternative spelling for a symbol in a discarded sectionFangrui Song2019-12-232-4/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | For undef-not-suggest.test, we currently make redundant alternative spelling suggestions: ``` ld.lld: error: relocation refers to a discarded section: .text.foo >>> defined in a.o >>> section group signature: foo >>> prevailing definition is in a.o >>> referenced by a.o:(.rodata+0x0) >>> did you mean: >>> defined in: a.o ld.lld: error: relocation refers to a symbol in a discarded section: foo >>> defined in a.o >>> section group signature: foo >>> prevailing definition is in a.o >>> referenced by a.o:(.rodata+0x8) >>> did you mean: for >>> defined in: a.o ``` Reviewed By: grimar, ruiu Differential Revision: https://reviews.llvm.org/D71735
* [ELF] Delete a redundant R_HINT check from isStaticLinkTimeConstant(). NFCFangrui Song2019-12-221-2/+2
| | | | scanReloc() returns when it sees an R_HINT.
* [lld][RISCV] Use an e_flags of 0 if there are only binary input files.John Baldwin2019-12-212-1/+12
| | | | | | | | | | | | | | | | | | Summary: If none of the input files are ELF object files (for example, when generating an object file from a single binary input file via "-b binary"), use a fallback value for the ELF header flags instead of crashing with an assertion failure. Reviewers: MaskRay, ruiu, espindola Reviewed By: MaskRay, ruiu Subscribers: kevans, grimar, emaste, arichardson, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits, jrtc27 Tags: #llvm Differential Revision: https://reviews.llvm.org/D71101
* hopefully last doc typo fix to cycle botsNico Weber2019-12-201-1/+1
|
* fix yet another doc typo to cycle botsNico Weber2019-12-201-2/+2
|
* [LLD] [COFF] Fix reporting duplicate errors for absolute symbolsMartin Storsjö2019-12-192-1/+17
| | | | | | | | | | | | | | Previously this caused crashes in the reportDuplicate method. A DefinedAbsolute doesn't have any InputFile attached to it, so we can't report the file for the original symbol. We could add an InputFile argument to SymbolTable::addAbsolute only for the sake of error reporting, but even then it'd be assymetrical, only pointing out the file containing the new conflicting definition, not the original one. Differential Revision: https://reviews.llvm.org/D71679
* [ELF] writePlt, writeIplt: replace parameters gotPltEntryAddr and index with ↵Fangrui Song2019-12-1812-88/+89
| | | | | | | | | | `const Symbol &`. NFC PPC::writeIplt (IPLT code sequence, D71621) needs to access `Symbol`. Reviewed By: grimar, ruiu Differential Revision: https://reviews.llvm.org/D71631
* [ELF] Fix a comment. NFCFangrui Song2019-12-171-1/+1
|
* [ELF] Rename .plt to .iplt and decrease EM_PPC{,64} alignment of .glink to 4Fangrui Song2019-12-1721-52/+73
| | | | | | | | | | | | | | | | | | | | | | GNU ld creates the synthetic section .iplt, and has a built-in linker script that assigns .iplt to the output section .plt . There is no output section named .iplt . Making .iplt an output section actually has a benefit that makes the tricky toolchain feature stand out. Symbolizers don't have to deal with mixed PLT entries (e.g. llvm-objdump -d incorrectly annotates such jump targets). On EM_PPC{,64}, .glink contains a PLT resolver and a series of jump instructions. The 4-byte entry size makes it unnecessary to have an alignment of 16. Mark ppc32-gnu-ifunc.s and ppc32-gnu-ifunc-nonpreemptable.s as `XFAIL: *`. They test IPLT on EM_PPC, which never works. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D71520
* [ELF] Add IpltSectionFangrui Song2019-12-1718-57/+123
| | | | | | | | | | | | | | | | | | | PltSection is used by both PLT and IPLT. The PLT section may have a header while the IPLT section does not. Split off IpltSection from PltSection to be clearer. Unlike other targets, PPC64 cannot use the same code sequence for PLT and IPLT. This helps make a future PPC64 patch (D71509) more isolated. On EM_386 and EM_X86_64, when PLT is empty while IPLT is not, currently we are inconsistent whether the PLT header is conceptually attached to in.plt or in.iplt . Consistently attach the header to in.plt can make the -z retpolineplt logic simpler. It also makes `jmp` point to an aesthetically better place for non-retpolineplt cases. Reviewed By: grimar, ruiu Differential Revision: https://reviews.llvm.org/D71519
* [MachO] Fix detecting malformed DWARF.Igor Kudrin2019-12-171-2/+2
| | | | | | | This fixes an invalid constant used to detect the reserved range when reading the compilation unit header. See also: D64622 and D65039. Differential Revision: https://reviews.llvm.org/D71546
* [ELF] Delete unused declaration addIRelativeRelocs after D65995. NFCFangrui Song2019-12-161-2/+0
|
* [ELF] Delete relOff from TargetInfo::writePLTFangrui Song2019-12-1614-59/+40
| | | | | | | | | | | | | | This change only affects EM_386. relOff can be computed from `index` easily, so it is unnecessarily passed as a parameter. Both in.plt and in.iplt entries are written by writePLT. For in.iplt, the instruction `push reloc_offset` will change because `index` is now different. Fortunately, this does not matter because `push; jmp` is only used by PLT. IPLT does not need the code sequence. Reviewed By: grimar, ruiu Differential Revision: https://reviews.llvm.org/D71518
* [ELF] De-template PltSection::addEntry. NFCFangrui Song2019-12-163-13/+8
|
* [ELF] Delete redundant isLive() check. NFCFangrui Song2019-12-151-2/+0
|
* Revert "[ELF] Allow getErrPlace() to work before Out::bufferStart is set"Vlad Tsyrklevich2019-12-132-6/+6
| | | | | | This reverts commit 2bbd32f5e8f0f62d895966e2623d9bdb9778b50b, it was causing UBSan failures like the following: lld/ELF/Target.cpp:103:41: runtime error: applying non-zero offset 24 to null pointer
* [ELF] Update st_size when merging a common symbol with a shared symbolFangrui Song2019-12-132-1/+34
| | | | | | | | | | | | | | | | | | When a common symbol is merged with a shared symbol, increase st_size if the shared symbol has a larger st_size. At runtime, the executable's symbol overrides the shared symbol. The shared symbol may be created from common symbols in a previous link. This rule makes sure we pick the largest size among all common symbols. This behavior matches GNU ld. See https://sourceware.org/bugzilla/show_bug.cgi?id=25236 for discussions. A shared symbol does not hold alignment constraints. Ignore the alignment update. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D71161
* [ELF] Allow getErrPlace() to work before Out::bufferStart is setAlex Richardson2019-12-132-6/+6
| | | | | | | | | | | | | | | | | | Summary: So far it seems like the only test affected by this change is the one I recently added for R_MIPS_JALR relocations since the other test cases that use this function early (unknown-relocation-*) do not have a valid input section for the relocation offset. Reviewers: ruiu, grimar, MaskRay, espindola Reviewed By: ruiu, MaskRay Subscribers: emaste, sdardis, jrtc27, atanasyan, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70659
* Revert an accidental commit af5ca40b47b3e85c3add81ccdc0b787c4bc355aeRui Ueyama2019-12-1310-148/+12
|
* Update the man pageRui Ueyama2019-12-131-1/+8
| | | | | | Add a description about the compression level of the debug info. Differential Revision: https://reviews.llvm.org/D71385
OpenPOWER on IntegriCloud