Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
If a binary gets invoked by passing it as argument to ld.so the stack
still holds the auxiliary vector of ld.so when entering the _start
routine of the executable. So the invocation via ld.so is not fully
transparent to the executable. This causes problems if the executable
wants to scan the auxv itself.
|
|
|
|
|
|
On some architectures the update of the l_used field in the lookup
functions races with setting the other bits in the bitfield. Simply
avoid this and optimize use of l_used in general.
|
|
|
|
do_sym should use DL_FIXUP_VALUE_XXX macros to call IFUNC function.
Otherwise, it won't compile on ia64. This patch fixes it and adds
a test.
|
|
|
|
|
|
|
|
|
|
|
|
When DL_LOOKUP_ADD_DEPENDENCY was introduced a few callers of
_dl_lookup_versioned_symbol were not properly adjusted. One of them
survived until now.
|
|
This patch fixes mixed SSE/AVX audit and checks AVX only once in
_dl_runtime_profile. When an AVX or SSE register value in pltenter is
modified, we have to make sure that the SSE part value is the same in both
lr_xmm and lr_vector fields so that pltexit will get the correct value
from either lr_xmm or lr_vector fields. AVX-enabled pltenter should
update both lr_xmm and lr_vector fields to support stacked AVX/SSE
pltenter functions.
|
|
An invalid symbol name pointer was entered into the hash table while
enlarging it.
|
|
SSE registers are used for passing parameters and must be preserved
in runtime relocations. This is inside ld.so enforced through the
tests in tst-xmmymm.sh. But the malloc routines used after startup
come from libc.so and can be arbitrarily complex. It's overkill
to save the SSE registers all the time because of that. These calls
are rare. Instead we save them on demand. The new infrastructure
put in place in this patch makes this possible and efficient.
|
|
|
|
This reduces the coarse static callgraph that can be discovered by
looking at the object files.
|
|
There were several issues when the initial 31 entries hashtab filled up.
size * 3 <= tab->n_elements is always false, table can't have more elements
than its size. I assume from libiberty/hashtab.c this meant to be check for
3/4 full. Even after fixing that, _dl_higher_prime_number (31) apparently
returns 31, only _dl_higher_prime_number (32) returns 61. And, size
variable wasn't updated during reallocation, which means during reallocation
the insertion of the new entry was done into a wrong spot.
All this lead to a hang in ld.so, because a search with n_elements 31 size
31 wouldn't ever terminate.
|
|
|
|
References to unique symbols from copy relocations can only come
from executables which cannot be unloaded anyway. Optimize the
code to set the unload flag a bit.
|
|
|
|
The hash value can be zero, so we need a different test for empty
slots. And unify the way we prevent a DSO from being unloaded.
|
|
|
|
The prototype for _dl_higher_prime_number was missing. While at it,
the function is now marked with internal_function.
|
|
|
|
|
|
It is not necessary/useful anymore to have the content separate
from dl-lookup.c.
|
|
Some symbols have to be identified process-wide by their name. This is
particularly important for some C++ features (e.g., class local static data
and static variables in inline functions). This cannot completely be
implemented with ELF functionality so far. The STB_GNU_UNIQUE binding
helps by ensuring the dynamic linker will always use the same definition for
all symbols with the same name and this binding.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mostly tests around not-exported IFUNC functions, IFUNC in statically
linked binaries and PIEs, etc.
|
|
|
|
|
|
|
|
The dl-lookup.c changes are needed for prelink (support in prelink
checked into SVN, tested for both i?86 and x86-64), dl-irel.h just
something I discovered by code inspection.
|
|
|
|
Little typo could cause additional characters to be printed.
|
|
Add support for the IRELAIVE relocation and IFUNC in static executables.
|
|
|
|
|
|
Add a text program, built to run on the host, to check all newly
built DSOs for executable stacks and fail if the stack information
is missing or indicates executable stacks.
|