| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In general the linker scripts's GROUP command works like a pair
of command line options --start-group/--end-group. But there is
a difference in the files look up algorithm.
The --start-group/--end-group commands use a trivial approach:
a) If the path has '-l' prefix, add 'lib' prefix and '.a'/'.so'
suffix and search the path through library search directories.
b) Otherwise, use the path 'as-is'.
The GROUP command implements more compicated approach:
a) If the path has '-l' prefix, add 'lib' prefix and '.a'/'.so'
suffix and search the path through library search directories.
b) If the path does not have '-l' prefix, and sysroot is configured,
and the path starts with the / character, and the script being
processed is located inside the sysroot, search the path under
the sysroot. Otherwise, try to open the path in the current
directory. If it is not found, search through library search
directories.
https://www.sourceware.org/binutils/docs-2.24/ld/File-Commands.html
The patch reviewed by Shankar Easwaran, Rui Ueyama.
llvm-svn: 207769
|
| |
|
|
|
|
| |
No functional changes.
llvm-svn: 207690
|
| |
|
|
|
|
|
|
| |
into the separate function.
No functional changes.
llvm-svn: 207689
|
| |
|
|
| |
llvm-svn: 207495
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
1. Re-implement PLT entries and dynamic relocations emitting to keep PLT
and relocations table in a consistent state.
2. Initialize st_value and st_other fields for dynamic symbols table
entry if this entry corresponds to an external function which address is
taken in a non-PIC executable. In that case the st_value field holds an
address of the function's PLT entry. Also set STO_MIPS_PLT bit in the
st_other field.
llvm-svn: 207494
|
| |
|
|
| |
llvm-svn: 207493
|
| |
|
|
| |
llvm-svn: 207435
|
| |
|
|
|
|
| |
member functions.
llvm-svn: 207434
|
| |
|
|
| |
llvm-svn: 206560
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently LLD supports --defsym only in the form of
--defsym=<symbol>=<integer>, where the integer is interpreted as the
absolute address of the symbol. This patch extends it to allow other
symbol name to be given as an RHS value. If a RHS value is a symbol
name, the LHS symbol will be defined as an alias for the RHS symbol.
Internally, a LHS symbol is represented as a zero-size defined atom
who has an LayoutAfter reference to an undefined atom, whose name is
the RHS value. Everything else is already implemented -- Resolver
will resolve the undefined symbol, and the layout pass will layout
the two atoms at the same location. Looks like it's working fine.
Note that GNU LD supports --defsym=<symbol>=<symbol>+<addend>. That
feature is out of scope of this patch.
Differential Revision: http://reviews.llvm.org/D3332
llvm-svn: 206417
|
| |
|
|
| |
llvm-svn: 206358
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a couple of new virtual functions.
Follow-up to the rL203408. Two virtual functions `createRelocationReference()`
responsible for creation of `ELFReference` have been replaced by a couple of
new virtual functions `createRelocationReferences()` (plural). Each former
function creates a //single// ELFReference for a specified `Elf_Rela`
or `Elf_Rel` relocation records. The new functions responsible for creation
of //all// relocation references for provided symbol.
For all targets except MIPS there are no functional changes.
MIPS ABI has a notion of //paired// relocations. An effective addend of such
relocations are calculated using addends of both pair's members.
Each `R_MIPS_HI16` and `R_MIPS_GOT16` (for local symbols) relocations must have
an associated `R_MIPS_LO16` entry immediately following it in the list
of relocations. Immediately does not mean "next record" in relocations section
but "next record referenced the same symbol". Moreover a single `R_MIPS_LO16`
relocation can be paired with multiple preceding `R_MIPS_HI16/R_MIPS_GOT16`
relocations.
The paired relocation can have offsets belong to the different symbols.
That is why we need to have access to list of all relocations during
construction of `ELFReference` for MIPS target.
The patch reviewed by Shankar Easwaran.
llvm-svn: 206102
|
| |
|
|
|
|
|
|
| |
function.
No functional changes.
llvm-svn: 206023
|
| |
|
|
|
|
|
|
|
| |
StringRef before calling the createSectionAtom() method and reverse
conversion inside the method.
No functional changes.
llvm-svn: 206022
|
| |
|
|
| |
llvm-svn: 206018
|
| |
|
|
|
|
| |
No functional changes.
llvm-svn: 205692
|
| |
|
|
| |
llvm-svn: 205645
|
| |
|
|
| |
llvm-svn: 205644
|
| |
|
|
| |
llvm-svn: 205568
|
| |
|
|
| |
llvm-svn: 205056
|
| |
|
|
| |
llvm-svn: 205034
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is to support --defsym option for ELF file format/GNU-compatible
driver. Currently it takes a symbol name followed by '=' and a number. If such
option is given, the driver sets up an absolute symbol with the specified
address. You can specify multiple --defsym options to define multiple symbols.
GNU LD's --defsym provides many more features. For example, it allows users to
specify another symbol name instead of a number to define a symbol alias, or it
even allows a symbol plus an offset (e.g. --defsym=foo+3) to define symbol-
relative alias. This patch does not support that, but will be supported in
subsequent patches.
Differential Revision: http://llvm-reviews.chandlerc.com/D3208
llvm-svn: 205029
|
| |
|
|
| |
llvm-svn: 204989
|
| |
|
|
|
|
|
| |
These classes are declared in a .cpp file but not used in the same compliation
unit. They seems to have been copy-and-pasted from ELFReader.h.
llvm-svn: 204988
|
| |
|
|
| |
llvm-svn: 204982
|
| |
|
|
| |
llvm-svn: 204607
|
| |
|
|
|
|
| |
pairs and calculate AHL addend.
llvm-svn: 204606
|
| |
|
|
| |
llvm-svn: 204503
|
| |
|
|
| |
llvm-svn: 204472
|
| |
|
|
| |
llvm-svn: 204355
|
| |
|
|
| |
llvm-svn: 204354
|
| |
|
|
| |
llvm-svn: 204353
|
| |
|
|
| |
llvm-svn: 204352
|
| |
|
|
|
|
| |
This reverts commit r204291 because it broke buildbots.
llvm-svn: 204317
|
| |
|
|
|
|
| |
With this all test-suite tests pass with lld on x86-64 Linux.
llvm-svn: 204291
|
| |
|
|
| |
llvm-svn: 204248
|
| |
|
|
|
|
|
|
|
| |
of GOT.
* Read addend for R_MIPS_GOT16 relocation.
* Put only high 16 bits of symbol + addend into GOT entries for
locally visible symbols.
llvm-svn: 204247
|
| |
|
|
|
|
| |
a uniform way.
llvm-svn: 204246
|
| |
|
|
|
|
|
| |
functions. The first one is for local GOT entries. The second one is for
global GOT entries.
llvm-svn: 204245
|
| |
|
|
| |
llvm-svn: 204244
|
| |
|
|
| |
llvm-svn: 204243
|
| |
|
|
|
|
| |
class.
llvm-svn: 204242
|
| |
|
|
| |
llvm-svn: 204222
|
| |
|
|
|
|
|
|
| |
This results in some simplifications to the code where an OwningPtr had to
be used with the previous api and then ownership moved to a unique_ptr for
the rest of lld.
llvm-svn: 203809
|
| |
|
|
| |
llvm-svn: 203744
|
| |
|
|
|
|
|
| |
This function returns a boolean value, so returning STT_COMMON does not
make sense.
llvm-svn: 203731
|
| |
|
|
| |
llvm-svn: 203666
|
| |
|
|
| |
llvm-svn: 203412
|
| |
|
|
| |
llvm-svn: 203411
|
| |
|
|
| |
llvm-svn: 203410
|