Commit Graph

1669 Commits

Author SHA1 Message Date
Alan Modra
c62cf60c6b fix powerpc macros in tls-macros.h 2010-02-12 05:32:09 -08:00
David S. Miller
311927f1bd Sparc STT_GNU_IFUNC support 2010-02-10 07:42:17 -08:00
Maxim Kuvyrkov
bbabf1f73f Add m68k TLS relocations 2010-02-10 07:24:21 -08:00
Andreas Schwab
db07e962b6 Use correct type when casting d_tag. 2010-01-18 07:24:09 -08:00
Andreas Schwab
7a033a828d Ignore negative dynamic entry types. 2010-01-18 07:23:23 -08:00
Andreas Krebbel
7760ccced8 /390: Add runtime check for the highgprs kernel feature. 2010-01-15 09:10:44 -08:00
Andreas Krebbel
3a56ea2673 ld.so: Adjust the auxv if ld.so is directly invoked.
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.
2010-01-15 09:09:35 -08:00
Roland McGrath
d5ea695b42 Add new ELF constant PN_XNUM. 2010-01-07 18:48:32 -08:00
Roland McGrath
4472e1de30 Use NT_GNU_HWCAP instead of literal 2. 2010-01-07 15:43:10 -08:00
Ulrich Drepper
2af6396817 Avoid ELF lookup race.
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.
2009-12-15 12:32:27 -08:00
Ulrich Drepper
639d6699e9 Fix up whitespaces. 2009-11-06 09:34:23 -08:00
H.J. Lu
8608ae1f7b Properly handle STT_GNU_IFUNC symbols in do_sym.
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.
2009-11-06 09:30:56 -08:00
Ulrich Drepper
3005703bb9 Add cast in tst-execstack to avoid warning. 2009-10-30 09:26:00 -07:00
Alan Modra
31c759bf37 Uglify IFUNC tests for PPC. 2009-10-30 00:48:54 -07:00
Alan Modra
77799d9d9b Implement IFUNC for PPC. 2009-10-30 00:39:38 -07:00
Andreas Schwab
bc5e846218 Handle IFUNC symbols in dlsym. 2009-10-21 06:23:42 -07:00
Andreas Schwab
96961bf71d Fix descriptor leak when calling dlopen with RTLD_NOLOAD 2009-10-07 10:25:38 +02:00
Ulrich Drepper
4fd894620f Fix missing reloc dependency
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.
2009-09-28 03:19:58 -07:00
H.J. Lu
4e1e2f4247 Support mixed SSE/AVX audit and check AVX only once.
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.
2009-08-08 10:54:42 -07:00
Andreas Schwab
7bc513cf18 Fix expanding STB_GNU_UNIQUE hash table.
An invalid symbol name pointer was entered into the hash table while
enlarging it.
2009-08-07 10:39:55 -07:00
Ulrich Drepper
b48a267b8f Preserve SSE registers in runtime relocations on x86-64.
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.
2009-07-29 08:33:03 -07:00
Ulrich Drepper
9655389317 Fix bookkeeping of static TLS block for TLS_TCB_AT_TP architectures. 2009-07-28 21:58:32 -07:00
Ulrich Drepper
87cfd82a1f Break out _dl_scope_free into its own file.
This reduces the coarse static callgraph that can be discovered by
looking at the object files.
2009-07-27 13:23:00 -07:00
Jakub Jelinek
09cd1f5754 Fix STB_GNU_UNIQUE handling for > 30 unique symbols.
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.
2009-07-27 07:25:57 -07:00
Ulrich Drepper
889f847e4a Define NT_GNU_GOLD_VERSION. 2009-07-26 08:26:43 -07:00
Ulrich Drepper
c15b1d20cd Minor optimization of unloading prevention patch.
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.
2009-07-23 07:40:56 -07:00
Ulrich Drepper
fe4d2935e8 Fix comment. 2009-07-23 07:37:48 -07:00
Ulrich Drepper
077e7700b3 Some more fixes for the unique symbol handling.
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.
2009-07-23 07:36:34 -07:00
Ulrich Drepper
802fe9a1ca Handle unloading of DSO with a unique symbol definition. 2009-07-23 07:07:53 -07:00
Ulrich Drepper
55c4ce6885 Remove warning and little optimization.
The prototype for _dl_higher_prime_number was missing.  While at it,
the function is now marked with internal_function.
2009-07-16 07:18:53 -07:00
Ulrich Drepper
59cbcac015 Fix build issue with modules for audit test on machines != x86-64. 2009-07-15 08:27:19 -07:00
H.J. Lu
b0ecde3a63 Add AVX support to ld.so auditing for x86-64. 2009-07-10 12:04:14 -07:00
Ulrich Drepper
786b74f41a Remove do-lookup.h.
It is not necessary/useful anymore to have the content separate
from dl-lookup.c.
2009-07-10 08:50:33 -07:00
Ulrich Drepper
415ac3df9b Implement STB_GNU_UNIQUE handling.
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.
2009-07-09 23:52:22 -07:00
Ulrich Drepper
b4f55afd03 Define STB_GNU_UNIQUE. 2009-07-07 09:53:01 -07:00
Ulrich Drepper
eba0994e75 Clean up code for hash table handling in ld.so. 2009-07-07 09:49:55 -07:00
Ulrich Drepper
a38862a589 Optimize test for valid ELF symbol types in lookup function. 2009-07-06 06:55:57 -07:00
Ulrich Drepper
241e680320 Fix whitespace in last patch. 2009-07-02 04:34:35 -07:00
H.J. Lu
167d5ed5de Fix handling of xmm6 in ld.so audit hooks on x86-64. 2009-07-02 04:33:12 -07:00
Ulrich Drepper
9618c7c20e More whitespace cleanups. 2009-06-22 15:11:18 -07:00
Ulrich Drepper
e364e6f118 Clean up whitespaces in last patch. 2009-06-22 15:10:30 -07:00
H.J. Lu
3c30afc862 Add more IFUNC tests.
Mostly tests around not-exported IFUNC functions, IFUNC in statically
linked binaries and PIEs, etc.
2009-06-22 15:07:40 -07:00
H.J. Lu
d8366b0970 Use +link-pie Makefile rule to link PIE ifunc tests. 2009-06-17 19:55:18 -07:00
Andreas Schwab
f60ddf9bf7 Don't treat bug reporting message as a format string. 2009-06-16 20:34:55 -07:00
H.J. Lu
435aa54b3b Consolidate PIE linking Makefile rules. 2009-06-16 09:19:59 -07:00
Jakub Jelinek
0212596218 libc part of prelink IFUNC support.
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.
2009-06-15 07:46:53 -07:00
H.J. Lu
2f083d7511 Test for ELF IFUNC functionality. 2009-06-03 16:21:40 -07:00
Ulrich Drepper
fbb04b35e7 Terminate correct buffer.
Little typo could cause additional characters to be printed.
2009-06-03 08:30:35 -07:00
Ulrich Drepper
7441470835 Finish IFUNC support for x86 and x86-64.
Add support for the IRELAIVE relocation and IFUNC in static executables.
2009-05-31 23:45:33 -07:00
Andreas Schwab
ff6ff38db2 Remove redundant .gitignore files. 2009-05-16 10:18:34 +02:00