- Jan 10, 2017
-
-
Peter Collingbourne authored
When reserving copy relocation space for a shared symbol, scan the DSO's program headers to see if the symbol is in a read-only segment. If so, reserve space for that symbol in a new synthetic section named .bss.rel.ro which will be covered by the relro program header. This fixes the security issue disclosed on the binutils mailing list at: https://sourceware.org/ml/libc-alpha/2016-12/msg00914.html Differential Revision: https://reviews.llvm.org/D28272 llvm-svn: 291524
-
Peter Collingbourne authored
This is in preparation for my next change, which will introduce a relro nobits section. That requires that relro sections appear at the end of the progbits part of the r/w segment so that the relro nobits section can appear contiguously. Because of the amount of churn required in the test suite, I'm making this change separately. llvm-svn: 291523
-
Michal Gorny authored
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from llvm-config instead of reconstructing it locally. llvm-svn: 291502
-
Meador Inge authored
Rafael suggested in review to wrap the `.` in an `ABSOLUTE` op to force the section to be in the *ABS* "section": * http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170109/417865.html llvm-svn: 291501
-
Rui Ueyama authored
This patch enables something like "-o /dev/null". Previouly, it failed because such files cannot be renamed. Differential Revision: https://reviews.llvm.org/D28010 llvm-svn: 291496
-
- Jan 09, 2017
-
-
Peter Collingbourne authored
The linkonce feature is a sort of proto-comdat. As far as I am aware no compiler produces linkonce sections anymore, but some glibc i386 object files contain definitions of symbol "__x86.get_pc_thunk.bx" in linkonce sections. Drop those sections to avoid duplicate symbol errors. This is glibc PR20543, we should remove this hack once that has been fixed for a while. Fixes PR31215. Differential Revision: https://reviews.llvm.org/D28430 llvm-svn: 291474
-
Meador Inge authored
This patch allows for linker scripts to assign a new value to a symbol that is already defined (either in an object file or the linker script itself). llvm-svn: 291459
-
Pavel Labath authored
Summary: Lld's build had a couple of issues which prevented a successfull LLVM_LINK_LLVM_DYLIB compilation. - add_llvm_library vs llvm_add_library: One adds a library to libLLVM.so, other one doesn't. Lld was using the wrong one, causing symbols to be mupltiply defined in things linking to libLLVM. - confusion when to use LINK_LIBS vs LINK_COMPONENTS in llvm_add_library - not using LLVM_LINK_COMPONENTS for add_lld_tool With these fixes lld compiles and it's test suite passes both in LLVM_LINK_LLVM_DYLIB mode and without it. Reviewers: ruiu, beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28397 llvm-svn: 291432
-
Rui Ueyama authored
This patch moves convertToUnixPathSeparator from LLD to LLVM. Differential Revision: https://reviews.llvm.org/D28444 llvm-svn: 291414
-
Rui Ueyama authored
Previously, files added using INCLUDE directive weren't added to reproduce archives. In this patch, I defined a function to open a file and use that from Driver and LinkerScript. llvm-svn: 291413
-
- Jan 07, 2017
-
-
Simon Pilgrim authored
llvm-svn: 291348
-
- Jan 06, 2017
-
-
Rafael Espindola authored
In order to keep symbol lookup a simple name lookup this patch adds versioned symbols with an explicit @ to the symbol table. llvm-svn: 291293
-
Rafael Espindola authored
Should bring back the windows bots. llvm-svn: 291263
-
Rafael Espindola authored
llvm-svn: 291261
-
Reid Kleckner authored
llvm-svn: 291257
-
Rui Ueyama authored
llvm-svn: 291224
-
Rui Ueyama authored
llvm-svn: 291223
-
Rui Ueyama authored
The two overloaded functions hid each other. This patch merges them. llvm-svn: 291222
-
Rui Ueyama authored
Now TarWriter takes care of path separator conversion, so we don't need to handle that in LLD. llvm-svn: 291221
-
Rui Ueyama authored
Previously, when we printed out a path obtained from DWARF debug info, we replaced \ with / on Windows. But that doesn't make sense. We should respect the system's path separator. llvm-svn: 291219
-
Rui Ueyama authored
llvm-svn: 291212
-
Rui Ueyama authored
This is how we use TarWriter in LLD. Now LLD does not append a file extension, so you need to pass `--reproduce foo.tar` instead of `--reproduce foo`. Differential Revision: https://reviews.llvm.org/D28103 llvm-svn: 291210
-
- Jan 05, 2017
-
-
Rafael Espindola authored
llvm-svn: 291113
-
Rafael Espindola authored
llvm-svn: 291110
-
Rafael Espindola authored
After Mark's patch I was wondering what was the rationale for the ELF spec requiring us to merge only sections with matching flags and types. I tried emailing https://groups.google.com/forum/#!forum/generic-abi, but looks like my emails are not being posted (the list is probably moderated). I emailed Cary Coutant instead. Cary pointed out that the section was a late addition and didn't got the scrutiny it deserved. Given that and the problems found by implementing the letter of the standard, I propose changing lld to merge all sections with the same name and issue errors if the types or some critical flags are different. This should allow an unmodified firefox linked with lld to run. This also merges some code with the linkerscript path. llvm-svn: 291107
-
- Jan 04, 2017
-
-
Rafael Espindola authored
We no longer tail merge section names. llvm-svn: 290988
-
Peter Collingbourne authored
The glibc dynamic loader rounds the size down, so without this the loader will fail to change the memory protection for the last page. Differential Revision: https://reviews.llvm.org/D28267 llvm-svn: 290986
-
Saleem Abdulrasool authored
The GUID should match between the RSDS and the PDB. This should repair the build bots, though we should be ensuring that the GUIDs match. Unfortunately, different build bots seem to be getting different GUIDs. llvm-svn: 290981
-
Saleem Abdulrasool authored
The PDB GUID, Age, and version are tied together by the RSDS record in the binary. Pass along the BuildId information into the createPDB to allow us to tie the binary and the PDB together. llvm-svn: 290975
-
Peter Smith authored
In a shared library an undefined symbol is implicitly imported. If the symbol is called as a function a PLT entry is generated for it. When the caller is a Thumb b.w a thunk to the PLT entry is needed as all PLT entries are in ARM state. This change allows undefined symbols to have thunks in the same way that shared symbols may have thunks. llvm-svn: 290951
-
Peter Collingbourne authored
llvm-svn: 290932
-
- Dec 30, 2016
-
-
Saleem Abdulrasool authored
Assert that the size of the MD5 result is the same size as the signature field being populated. Use the sizeof operator to determine the size of the field being written rather than hardcoding it to the magic number 16. NFC. llvm-svn: 290764
-
- Dec 25, 2016
-
-
George Rimar authored
llvm-svn: 290510
-
- Dec 23, 2016
-
-
George Rimar authored
This fixes issue revealed by r289961. Differential revision: https://reviews.llvm.org/D28045 llvm-svn: 290419
-
Rui Ueyama authored
We managed new MemoryBuffers in different ways in LinkerScript.cpp and Driver.cpp. With this patch, they are managed in the same way. llvm-svn: 290411
-
Petr Hosek authored
This is necessary for the distribution targets which assume that each component has an install target. This also moves the CMake macros into a separate file akin to other LLVM projects. Differential Revision: https://reviews.llvm.org/D27876 llvm-svn: 290391
-
- Dec 22, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D27194 llvm-svn: 290339
-
George Rimar authored
This is last known noticable fatal() in target.cpp. We also have other ones for unknown relocations or creating unknown targets, but that one can be just error I think. Used yaml2obj to generate test. Differential revision: https://reviews.llvm.org/D28049 llvm-svn: 290335
-
Rui Ueyama authored
Vectors returned form that function contained nullptrs or Undefined symbols. This patch filter them out. This makes use of the function a bit easier. llvm-svn: 290334
-
Rui Ueyama authored
Previously, that was an alias to -color-diagnostics=auto. However, Clang's -fcolor-diagnostics is an alias to -fcolor-diagnostics=always, so that was confusing. This patch fixes that issue. llvm-svn: 290332
-