| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
@indntpoff is similar to @gotntpoff, but for use in position dependent code. While @gotntpoff resolves to GOT slot address relative to the
start of the GOT in the movl or addl instructions, @indntpoff resolves to the
absolute GOT slot address. ("ELF Handling For Thread-Local Storage", Ulrich Drepper).
Differential revision: http://reviews.llvm.org/D15494
llvm-svn: 255884
|
| |
|
|
|
|
|
|
|
|
|
|
| |
eh_frame.
Ian Lance Taylor writes: "Read 4 bytes. If they are not 0xffffffff, they are the length of the CIE or FDE record. Otherwise the next 64 bits holds the length, and this is a 64-bit DWARF format. This is like .debug_frame." (http://www.airs.com/blog/archives/460), that also consistent with spec (https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/ehframechpt.html).
Patch implements support of described extended length field and also adds few more checks for safety.
Differential revision: http://reviews.llvm.org/D15532
llvm-svn: 255883
|
| |
|
|
| |
llvm-svn: 255870
|
| |
|
|
|
|
| |
Just "copy" was a bit too ambiguous to say about copy relocations.
llvm-svn: 255866
|
| |
|
|
|
|
|
|
|
|
| |
Previously, OffsetInBSS is -1 if it has no information about copy
relocation, 0 if it needs a copy relocation, and >0 if its offset
in BSS has been assigned. These flags were too subtle. This patch
adds a new flag, NeedsCopy, to carry information about whether
a shared symbol needs a copy relocation or not.
llvm-svn: 255865
|
| |
|
|
| |
llvm-svn: 255861
|
| |
|
|
| |
llvm-svn: 255857
|
| |
|
|
|
|
| |
'TLS'.
llvm-svn: 255856
|
| |
|
|
| |
llvm-svn: 255855
|
| |
|
|
|
|
| |
Symbol is a struct and can be initialized using an initializer.
llvm-svn: 255854
|
| |
|
|
| |
llvm-svn: 255853
|
| |
|
|
|
|
|
| |
The function was used only in Writer.cpp and did not depend on SymbolTable.
There is no reason to have that function in SymbolTable.cpp.
llvm-svn: 255850
|
| |
|
|
|
|
| |
Because the function does not use any member of SymbolTable class.
llvm-svn: 255849
|
| |
|
|
| |
llvm-svn: 255846
|
| |
|
|
|
|
|
| |
We had duplicate code that were called before addMemberFile.
This patch makes them to be called at beginning of addMemberFile.
llvm-svn: 255845
|
| |
|
|
|
|
|
|
| |
addELFFile was called only from addFile, and what it did was actually
just adding a file to the symbol table. There seems to be no reason
to separate the two.
llvm-svn: 255839
|
| |
|
|
|
|
|
|
|
|
|
| |
negDelta32 is only ever implicitly generated as the FDE->CIE reference.
We therefore don't emit a relocation for it in the object file in -r mode.
The value we write in to the FDE location therefore needs to point to the
final target address of the CIE, and not the inAtomAddress as it was currently
doing.
llvm-svn: 255835
|
| |
|
|
|
|
| |
We don't do that in other places in the same file.
llvm-svn: 255833
|
| |
|
|
|
|
|
| |
Since the functions are members of SymbolTable class, it is obvious
that they are adding symbols.
llvm-svn: 255832
|
| |
|
|
| |
llvm-svn: 255830
|
| |
|
|
|
|
|
| |
Previously reportConflict returned only when the third argument is false.
Now it always returns a value.
llvm-svn: 255829
|
| |
|
|
|
|
|
| |
In debug builds there's now a dump method on Section and improved
printing of atoms.
llvm-svn: 255826
|
| |
|
|
| |
llvm-svn: 255823
|
| |
|
|
|
|
|
|
|
|
|
| |
After r255819, parse() actually parses what you pass it.
This test was failing because it passed '--debug-only' which isn't in
release builds, but also 'foo' which isn't an option at all.
We now pass -enable-tbaa and -enable-misched which are real options.
llvm-svn: 255822
|
| |
|
|
|
|
|
|
|
| |
We used to parse the LLVM options in Driver::link. However, that is
after parse() where we load files. By moving the LLVM option handling
earlier, we can add DEBUG() to code such as MachONormalizedFileToAtoms.cpp
and have it enabled correctly by '-mllvm --debug'.
llvm-svn: 255819
|
| |
|
|
|
|
|
|
|
|
|
|
| |
doing. NFC.
We had some DEBUG prints these passes, but add more so that its clear where we are dumping
things, and what state we are in when we do so.
I'll be adding more and more DEBUG printing to try make it easier to observe whats going on
without having to attach a debugger.
llvm-svn: 255805
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The `_gp_disp` is a magic symbol designates offset between start of
function and gp pointer into GOT. Only `R_MIPS_HI16` and `R_MIPS_LO16`
relocations are permitted with `_gp_disp`. The patch adds the `_gp_disp`
as an ignored symbol and adjusts symbol value before call the `relocateOne`
for `R_MIPS_HI16/LO16` relocations.
Differential Revision: http://reviews.llvm.org/D15480
llvm-svn: 255768
|
| |
|
|
| |
llvm-svn: 255646
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
[ELF] - refactor of code in RelocationSection<ELFT>::writeTo()
Just a little reformat of 'if' conditions, NFC.
Differential revision: http://reviews.llvm.org/D15453
Fix was:
* Renamed unsigned Rel; to unsigned Reloc;
llvm-svn: 255631
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RelocationSection<ELFT>::writeTo()"
as it broke buildbot:
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/17836/steps/build_Lld/logs/stdio
/Users/buildslave/as-bldslv9/lld-x86_64-darwin13/llvm.src/tools/lld/ELF/OutputSections.cpp:268:14: error: redefinition of 'Rel'
unsigned Rel; ^
/Users/buildslave/as-bldslv9/lld-x86_64-darwin13/llvm.src/tools/lld/ELF/OutputSections.cpp:241:34: note: previous definition is here
for (const DynamicReloc<ELFT> &Rel : Relocs) {
That compiles fine on my MSVS 2015 thought.
llvm-svn: 255628
|
| |
|
|
|
|
|
|
| |
Just a little reformat of 'if' conditions, NFC.
Differential revision: http://reviews.llvm.org/D15453
llvm-svn: 255626
|
| |
|
|
|
|
|
| |
The `mipsHigh` return type is `uint16_t` so we do not need to extract
low 16-bits from return value explicitly.
llvm-svn: 255622
|
| |
|
|
|
|
|
|
|
|
| |
The `R_MIPS_JALR` is a relocation generated by gcc and gas. This
relocation points to the `jalr` instruction which might be optimized and
converted to the `b` instruction under some conditions.
Now we just ignore this relocation and keep instructions unchanged.
llvm-svn: 255453
|
| |
|
|
|
|
|
| |
If we have R_MIPS_HI16 relocation, the paired relocation is the next
R_MIPS_LO16 relocation with the same symbol as a target.
llvm-svn: 255452
|
| |
|
|
| |
llvm-svn: 255451
|
| |
|
|
|
|
|
|
|
| |
appropriate bits.
This fixes the remaining clang regression test failures when linking clang with
lld on Darwin.
llvm-svn: 255390
|
| |
|
|
|
|
|
| |
If we don't filter these out we can end up, generating bogus paths, for example:
/home/user/lld/build/bin -> /home/user/home/user/lld/build/bin/lld/build/bin.
llvm-svn: 255378
|
| |
|
|
|
|
|
| |
There is work under way in llvm to avoid creating unnecessary names for
symbols. This makes lld capable of handling that.
llvm-svn: 255357
|
| |
|
|
|
|
| |
This matches the behavior of both gold and bfd ld.
llvm-svn: 255355
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It is reasonable to specify an entry point for shared objects - for
example, for the FreeBSD rtld ld-elf.so.1.
Unlike GNU ld we leave the entry address as 0 if -shared is specified
without -e.
Differential Revision: http://reviews.llvm.org/D15454
llvm-svn: 255349
|
| |
|
|
| |
llvm-svn: 255347
|
| |
|
|
|
|
|
|
|
|
|
|
| |
R_X86_64_SIZE64/R_X86_64_SIZE32 relocations were introduced in 0.98v of "System V Application Binary Interface x86-64" (http://www.x86-64.org/documentation/abi.pdf).
Calculation for them is Z + A, where:
Z - Represents the size of the symbol whose index resides in the relocation entry.
A - Represents the addend used to compute the value of the relocatable field.
Differential revision: http://reviews.llvm.org/D15335
llvm-svn: 255332
|
| |
|
|
|
|
|
|
| |
Fixes PR25798.
Thanks to Ed Maste for the bug report and suggested fix.
llvm-svn: 255307
|
| |
|
|
| |
llvm-svn: 255284
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When llvm-lit prints a failure, you'll see something like 'lld *command*' However, you can't then take this, paste it in to a terminal and run it, because it's not got the absolute path of lld.
llvm and clang's lit.cfg files contain lists of commands to look for which are substituted by their full paths. So now you'd see something like '*build dir*/bin/lld *command*'.
This patch adds the same capability to lld's lit.cfg
Reviewed by Rafael Espíndola
llvm-svn: 255283
|
| |
|
|
| |
llvm-svn: 255282
|
| |
|
|
|
|
|
|
|
|
| |
The delta64 relocation is represented as the pair ARM64_RELOC_SUBTRACTOR and ARM64_RELOC_UNSIGNED.
Those should always have the same offset, so this adds a check and tests to ensure this is the case.
Also updated the error printing in this case to shows both relocs when erroring on pair.
llvm-svn: 255274
|
| |
|
|
| |
llvm-svn: 255249
|
| |
|
|
|
|
|
|
| |
List all sections removed by garbage collection. This option is only effective if garbage collection has been enabled via the `--gc-sections' option.
Differential revision: http://reviews.llvm.org/D15327
llvm-svn: 255235
|
| |
|
|
|
|
|
|
|
| |
If R_386_PLT32 relocation is applied against symbol that can not be preempted then it can be resolved statically.
Patch implements it for x86 target.
Differential revision: http://reviews.llvm.org/D15376
llvm-svn: 255233
|