| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
does not get an entry in the dynamic symbol table.
llvm-svn: 210648
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 210531
|
|
|
|
|
|
| |
R_MIPS_TLS_LDM etc.
llvm-svn: 210394
|
|
|
|
|
|
|
|
| |
This provides support for the autoconfing & make build style.
The format, style and implementation follows that used within the llvm and clang projects.
TODO: implement out-of-source documentation builds.
llvm-svn: 210177
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arrange .ctors/.dtors sections in the following order:
.ctors from crtbegin.o or crtbegin?.o
.ctors from regular object files
.ctors.* (sorted) from regular object files
.ctors from crtend.o or crtend?.o
This order is specific for MIPS traget. For example, on X86
the .ctors.* sections are merged into the .init_array section.
llvm-svn: 209987
|
|
|
|
|
|
|
| |
There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.
llvm-svn: 209948
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main problem is in the predicate passed to the `std::stable_sort()`.
This predicate always returns false if **both** section's names do not
start with `.init_array` or `.fini_array` prefixes. In short, it does not
define a strict weak orderng. Suppose we have the following sections:
.A .init_array.1 .init_array.2
The predicate states that:
not .init_array.1 < .A
not .A < .init_array.2
but .init_array.1 < .init_array.2 !!!
The second problem is that `.init_array` section without number should
go last in the list. Not it has the lowest priority '0' and goes first.
The patch fixes both of the problems.
llvm-svn: 209875
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 209709
|
|
|
|
| |
llvm-svn: 209644
|
|
|
|
|
|
| |
size of global GOT entries map for that.
llvm-svn: 209616
|
|
|
|
|
|
| |
perform calculations for R_MIPS_GOT16 and R_MIPS_CALL16 relocations.
llvm-svn: 209594
|
|
|
|
|
|
| |
separate function.
llvm-svn: 209593
|
|
|
|
|
|
| |
the MipsELFWriters member function.
llvm-svn: 209592
|
|
|
|
| |
llvm-svn: 209591
|
|
|
|
|
|
| |
perform similar calculations.
llvm-svn: 209590
|
|
|
|
| |
llvm-svn: 209582
|
|
|
|
|
|
|
|
|
|
| |
Alias symbols are SimpleDefinedAtoms and are platform neutral. They
don't have to belong ELF. This patch is to make it available to all
platforms. No functionality change intended.
Differential Revision: http://reviews.llvm.org/D3862
llvm-svn: 209475
|
|
|
|
|
|
| |
against _gp_disp symbol.
llvm-svn: 209315
|
|
|
|
| |
llvm-svn: 209213
|
|
|
|
|
|
|
| |
relocation. In fact this case violates ABI but sometimes compilers might
produce such code.
llvm-svn: 209153
|
|
|
|
|
|
| |
referenced by a local symbol.
llvm-svn: 209063
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If one or more dynamic relocation might modify a read-only section,
dynamic table should contain DT_TEXTREL tag.
The patch introduces new `RelocationTable::canModifyReadonlySection()`
method. This method checks through the relocations to see if any modifies
a read-only section. The DynamicTable class calls this method and emits
the DT_TEXTREL tag if necessary.
The patch reviewed by Rui Ueyama and Shankar Easwaran.
llvm-svn: 208670
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3599
llvm-svn: 207989
|
|
|
|
|
|
| |
No functional changes.
llvm-svn: 207953
|
|
|
|
| |
llvm-svn: 207949
|
|
|
|
|
|
| |
This reverts commit r207884 which was prematurely committed by accident.
llvm-svn: 207886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
isAlias always returns false and no one is using it. It was
originally added Atom to query if an atom is an alias for another
atom, assuming that alias atoms are different from normal atoms.
We now support atom aliasing, but the way that's implemented is
in a different way than what isAlias assumed. An alias atom is
just a regular defined atom with no content, and it has a layout-
before edge to alias-to atom so that they are layed out at the
same location in the result. So this is dead code, and it doesn't
make much sense to keep it.
llvm-svn: 207884
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|