Commit Graph

1841 Commits

Author SHA1 Message Date
Piotr Bury
320a5dc07b Fix resizing able for unique symbols when adding symbol for copy relocation 2011-05-12 21:59:09 -04:00
Ulrich Drepper
22836f52e3 Fix up testing for valid $ORIGIN use 2011-05-11 00:15:38 -04:00
Alan Modra
66bdbaa452 static tls memory leak on TLS_DTV_AT_TP archs 2011-05-07 21:27:51 -04:00
Ulrich Drepper
47c3cd7a74 Allow $ORIGIN to reference trusted directoreis in SUID binaries. 2011-05-07 11:44:26 -04:00
Andreas Schwab
00ee369c1c ldconfig: don't crash on empty path in config file 2011-05-03 13:44:25 -04:00
Jim Meyering
ded5b9b7c7 Remove doubled words. 2011-04-22 21:34:32 -04:00
Richard Sandiford
e3d8f58414 elf.h: Define R_ARM_IRELATIVE reloc type. 2011-04-19 09:38:42 -07:00
Ulrich Drepper
e6c6149412 Fix memory leak in TLS of loaded objects. 2011-04-10 22:43:01 -04:00
Andreas Schwab
34fe483e12 Don't leave empty element in rpath when skipping an element 2011-04-09 14:55:26 -04:00
Ulrich Drepper
028478fa40 Fix copy relocations handling of unique objects. 2011-03-10 12:51:33 -05:00
Ulrich Drepper
33f85a3fb9 Don't run tests checking xecutable stack when SELinux is enforcing. 2011-03-10 03:18:21 -05:00
Ulrich Drepper
6a5ee1029b Fix loading first object along a path when tracing. 2011-03-06 00:01:50 -05:00
Andreas Schwab
4bff6e0175 Fix memory leak in dlopen with RTLD_NOLOAD. 2011-02-25 20:49:48 -05:00
Andreas Schwab
f2092faf2b Don't crash when dependencies are missing 2011-02-25 16:51:24 -05:00
Andreas Schwab
e23fe25b33 Move setting variable in relro data earlier in ld.so. 2011-02-20 07:24:56 -05:00
Nathan Sidwell
d3f02e1012 elf/elf.h: Add new ARM TLS relocs. 2011-02-18 11:09:18 -08:00
Ulrich Drepper
e943389325 Remove use of ranlib. 2011-02-15 14:52:29 -05:00
Roland McGrath
a0bf67cca2 Fix some warning nits. 2011-02-04 10:53:51 -08:00
H.J. Lu
435b95ebd0 AVX audit test failures with gcc 4.6 2011-02-02 19:28:44 -05:00
Ulrich Drepper
8517b15ee8 Fix passing symbol value to pltexit callbacks when ld.so auditing. 2011-02-02 11:50:49 -05:00
Ulrich Drepper
968dad0ab1 Fix ordering of DSO constructors and destructors. 2011-01-19 16:00:11 -05:00
Ulrich Drepper
5d5732b0dc Run IFUNC tests unless no support build in at all. 2011-01-18 12:30:07 -05:00
Ulrich Drepper
c0dafcf176 Update copyright year. 2011-01-17 15:08:10 -05:00
Andreas Schwab
1f20b93a6c Fix missing dependencies and ensure correct CPPFLAGS. 2011-01-16 21:32:07 -05:00
Andreas Schwab
68dc949774 Fix check-execstack test 2011-01-13 16:21:55 -05:00
Ulrich Drepper
0876917582 Fix assertion when handling DSTs during auditing. 2011-01-12 23:10:00 -05:00
Ulrich Drepper
8bdf4e6eb8 Pretty printing. 2010-12-24 20:15:45 -05:00
H.J. Lu
4a531bb0b3 Remove .ctors' and .dtors' output sections 2010-12-24 20:14:37 -05:00
Ryan S. Arnold
30950a5fd2 Make PowerPC64 default to nonexecutable stack 2010-12-19 22:49:01 -05:00
Petr Baudis
6db52fbb27 Allow aux_cache_file open()ing to fail silently even in the chroot mode.
The aux_cache fix of bug 11149 introduced a new bug - normally,
ldconfig -r never cares if the auxiliary cache is not available and
that is not a fatal problem, however this is not the case in case
of ldconfig -r when executed as non-root. In that case, ldconfig -r
fails hard unless var/cache/ldconfig/ exists within the chroot. This
patch fixes that.

Conflicts:

	ChangeLog
2010-11-22 12:47:57 -05:00
Ulrich Drepper
fa41c84d73 Fix assertion in ld.so, introduced by delayed adding to global list. 2010-10-26 13:01:46 -04:00
Andreas Krebbel
f09677388a Fix concurrency problem between dl_open and dl_iterate_phdr 2010-10-26 00:23:14 -04:00
Andreas Schwab
8e9f92e9d5 Require suid bit on audit objects in privileged programs 2010-10-24 21:43:15 -04:00
Andreas Schwab
bc96fbda27 Work around shortest-stem feature in make 3.82+ 2010-10-24 21:42:39 -04:00
Andreas Schwab
22cd1c9bcf Don't expand DST twice in dl_open 2010-10-24 20:40:14 -04:00
Ulrich Drepper
09fad1a611 Whitespace cleanup. 2010-09-21 13:53:31 -07:00
Andreas Schwab
56801c50d4 Move freeres function from ld.so to libc.so. 2010-09-21 13:52:12 -07:00
Andreas Schwab
bc5fb0374c Don't try to free rpath strings allocated during startup 2010-09-15 07:20:57 -07:00
Roland McGrath
5dbc3b6cc0 Fix vDSO synthetic hwcap handling so they are not masked out from ld.so.cache matching. 2010-07-20 19:09:50 -07:00
Andreas Schwab
5be9d05d31 Don't pass NULL occation to dl_signal_cerror 2010-07-06 08:09:54 -07:00
Ulrich Drepper
702e8f1450 More linking issues fixed. 2010-07-02 09:49:05 -07:00
Ulrich Drepper
d85f8ff667 Revert unwanted patch. Again. 2010-06-27 19:52:51 -07:00
Ulrich Drepper
a3d731d344 Fix whitespaces. 2010-06-27 19:39:01 -07:00
Kirill A. Shutemov
80da2e093c Flush cache after solving TEXTRELs if arch requires it. 2010-06-14 17:23:01 -07:00
Ulrich Drepper
b32b8b451b Don't crash on unresolved weak symbol reference when auditing. 2010-05-21 23:51:18 -07:00
Andreas Schwab
9acbe24da8 Don't crash on unresolved weak symbol reference 2010-05-21 12:51:43 -07:00
Roland McGrath
3f7dcb2b0f Fix a const warning in ldconfig. 2010-05-07 16:23:03 -07:00
Ulrich Drepper
7dee26605b Fix ldconfig to handle symlinks in chroot correctly. 2010-05-03 14:04:52 -07:00
Ulrich Drepper
f297602394 Simplify OOM handling in ldconfig. 2010-05-03 13:33:13 -07:00
Ulrich Drepper
49bd556d43 One more bug in ldconfig -r handling. 2010-05-03 10:40:30 -07:00
Andreas Schwab
5a2a1d7504 Don't deadlock in __dl_iterate_phdr while (un)loading objects. 2010-05-03 08:08:28 -07:00
Ulrich Drepper
c739ec3d81 Code cleanup in __dl_iterate_phdr. 2010-05-03 06:34:56 -07:00
Roland McGrath
1d4bf3155f Link elf/noload test against -ldl. 2010-04-19 15:38:48 -07:00
Andreas Schwab
18a26b301b Don't crash in trace mode when dependencies are missing 2010-04-14 22:16:06 -07:00
Matt Fleming
3d1020f0cc elf/elf.h: Add SH specific ELF header flags. 2010-04-13 12:10:31 -07:00
Ulrich Drepper
85997fc3eb Merge remote branch 'origin/roland/hwcap_mask' 2010-04-08 16:06:54 -07:00
Joseph Myers
afd46a4c7d elf/elf.h (ELFOSABI_ARM_AEABI): Define. 2010-04-05 20:14:43 -07:00
Roland McGrath
7bfa311ff5 Obey LD_HWCAP_MASK in ld.so.cache lookups. 2010-04-05 19:47:27 -07:00
Roland McGrath
4dd019e3a1 elf/rtld.c (dl_main) [HAVE_AUX_VECTOR]: Add a cast. 2010-04-05 19:44:16 -07:00
Ulrich Drepper
4bc2bcba67 Fix aux cache handling in ldconfig with chroot. 2010-04-05 11:26:43 -07:00
Thomas Schwinge
bc58236c65 Handle platforms without aux vector 2010-03-29 15:13:53 -07:00
Richard Henderson
b1c1949e60 Don't take the address of a void object.
GCC 4.5 warns about "extern void _end; &end;".
Use char[] instead, as that also doesn't fall foul
of a target's .sdata optimizations.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2010-03-26 09:16:21 -07:00
Ulrich Drepper
4ad43b62d6 Fix handling of STB_GNU_UNIQUE in LD_TRACE_PRELINKING 2010-03-24 10:14:22 -07:00
Ulrich Drepper
04f2902d9f Future safety in checking ELF header.
If we should use further fields in the e_ident array in the ELF header
of files we want zero to mean the default.  Enforce zero for now so
that non-optional features indicated by nonzero values are not go
unnoticed when using an old dynamic linker.
2010-03-18 13:15:27 -07:00
Ulrich Drepper
d8c47894ca Extended ELF ABI version handling only for Linux.
If the OSABI is generic we should not allow the ABI version to be nonzero.
Move all the new functionality into Linux-specific files.
2010-03-16 23:34:59 -07:00
Ulrich Drepper
561470e061 Update copyright year. 2010-03-15 11:50:59 -07:00
Ulrich Drepper
92ad15a8f1 Implement handling of libc ABI in ELF header. 2010-03-15 11:44:58 -07:00
Andreas Schwab
4c35fb65c9 Don't underestimate length of DST substitution 2010-03-12 07:57:19 -08:00
Roland McGrath
4bf7d39245 elf.h: Add missing R_X86_64_*64 relocs. 2010-03-11 00:44:28 -08:00
Ulrich Drepper
3df9903e41 Define new x86-64 relocation symbols 2010-03-04 19:49:04 -08:00
Roland McGrath
f2899a62cf Define NT_X86_XSTATE constant for ELF core files. 2010-02-28 16:26:27 -08:00
Ulrich Drepper
844c394a05 Fix comment. 2010-02-24 19:27:24 -08:00
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
Jim Meyering
2e180a2622 rename each .cvsignore file to .gitignore 2009-05-15 18:13:37 +02:00
Ulrich Drepper
774f5a3082 Test DSOs for executable stack.
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.
2009-05-15 08:48:00 -07:00
Ulrich Drepper
e49dc847d2 [BZ #10087]
* elf/dl-runtime.c (_dl_fixup): Use DL_FIXUP_VALUE_ADDR to access
	result of lookup to make call to implement STT_GNU_IFUNC.
	(_dl_profile_fixup): Likewise.
	Patch by H.J. Lu <hjl.tools@gmail.com>.
2009-04-27 03:01:36 +00:00
Ulrich Drepper
1ac03a1e44 * nscd/connections.c (send_ro_fd): Define temporary variable to avoid
warning.

	* elf/sprof.c: Likewise.
2009-04-26 22:31:19 +00:00
Ulrich Drepper
6cc8844f1d * sysdeps/unix/sysv/linux/dl-osinfo.h (dl_fatal): Remove inline
from definition.

	* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Don't define
	label if it is not used.

	* elf/dl-profile.c (_dl_start_profile): Define real-type variant
	of gmon_hist_hdr and gmon_hdr structures and use them.

	* elf/dl-load.c (open_verify): Add temporary variable to avoid
	warning.

	* nscd/nscd_helper.c (get_mapping): Avoid casts to avoid warnings.

	* sunrpc/clnt_raw.c (clntraw_private_s): Use union in definition
	to avoid cast.

	* inet/rexec.c (rexec_af): Make sa2 a union to avoid warnings.
	* inet/rcmd.c (rcmd_af): Make from a union of the various needed types
	to avoid warnings.
	(iruserok_af): Use ss_family instead of casts.

	* gmon/gmon.c (write_hist): Define real-type variant of
	gmon_hist_hdr structure and use it.
	(write_gmon): Likewise for gmon_hdr.

	* sysdeps/unix/sysv/linux/readv.c: Avoid declaration of replacement
	function if we are not going to define it.
	* sysdeps/unix/sysv/linux/writev.c: Likewise.

	* inet/inet6_option.c (optin_alloc): Add temporary variable to
	avoid warning.

	* libio/strfile.h (struct _IO_streambuf): Use correct type and
	name of VTable element.
	* libio/iovsprintf.c: Avoid casts to avoid warnings.
	* libio/iovsscanf.c: Likewise.
	* libio/vasprintf.c: Likewise.
	* libio/vsnprintf.c: Likewise.
	* stdio-common/isoc99_vsscanf.c: Likewise.
	* stdlib/strfmon_l.c: Likewise.
	* debug/vasprintf_chk.c: Likewise.
	* debug/vsnprintf_chk.c: Likewise.
	* debug/vsprintf_chk.c: Likewise.
2009-04-26 20:12:37 +00:00
Ulrich Drepper
a245eafd2b [BZ #10069]
2009-04-19  Ulrich Drepper  <drepper@redhat.com>
	[BZ #10069]
	* elf/dl-open.c (dl_open_worker): We cannot guarantee that we can load
	an object that uses static TLS if the TLS modid is higher than the
	reserve we always allocate.  At least for multi-threaded code.
2009-04-19 21:45:02 +00:00
Roland McGrath
bf8523c867 2009-04-16 Samuel Thibault <samuel.thibault@ens-lyon.org>
* elf/rtld.c (dl_main): Really call _dl_sysdep_start_cleanup after all
	calls to _dl_relocate_object.
2009-04-17 00:00:08 +00:00
Jakub Jelinek
733ca93a45 * elf/dl-open.c (_dl_open): Bump GL(dl_nns) to 1 if no libraries
are dlopened in statically linked program even for __LM_ID_CALLER.
2009-04-16  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-open.c (_dl_open): Bump GL(dl_nns) to 1 if no libraries
	are dlopened in statically linked program even for __LM_ID_CALLER.
2009-04-16 15:22:05 +00:00
Roland McGrath
ce4ae9230c 2009-04-14 Roland McGrath <roland@redhat.com>
* elf/elf.h: Add various missing ARM constants, to match binutils.
2009-04-15 00:15:54 +00:00
Roland McGrath
5ee3019c00 Missed copyright year update 2009-04-02 01:20:33 +00:00
Roland McGrath
b38cf00fb4 2009-04-01 Roland McGrath <roland@redhat.com>
* elf/elf.h (R_SPARC_GLOB_JMP): New macro.
	(R_SPARC_GOTDATA_HIX22, R_SPARC_GOTDATA_LOX10): New macros.
	(R_SPARC_GOTDATA_OP_HIX22, R_SPARC_GOTDATA_OP_LOX10): Likewise.
	(R_SPARC_GOTDATA_OP, R_SPARC_H34): Likewise.
	(R_SPARC_SIZE32, R_SPARC_SIZE64): Likewise.
	(R_SPARC_GNU_VTINHERIT, R_SPARC_GNU_VTENTRY, R_SPARC_REV32): Likewise.
	(R_SPARC_NUM): Update.
	From Dave Miller <davem@davemloft.net>.
2009-04-02 01:19:33 +00:00
Ulrich Drepper
22c8319345 * elf/dl-open.c: Keep track of used name spaces and only iterate over
those which are used.
	* elf/dl-addr.c: Likewise.
	* elf/dl-caller.c: Likewise.
	* elf/dl-fini.c: Likewise.
	* elf/dl-iteratephdr.c: Likewise.
	* elf/dl-libc.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/rtld.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
2009-04-01 00:26:36 +00:00
Ulrich Drepper
20739e5454 * elf/dl-load.c: Remove support for systems without MAP_ANON.
* elf/dl-minimal.c: Likewise.
	* elf/dl-misc.c: Likewise.
	* elf/rtld.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
2009-03-31 22:03:24 +00:00
Ulrich Drepper
cb14424eb9 * elf/do-lookup.h (do_lookup_x): Minor optimization and cleanup.
Avoid reuse of complex expression.
2009-03-30 21:14:32 +00:00
Ulrich Drepper
2ca285b098 [BZ #9733]
* elf/dl-load.c (_dl_map_object_from_fd): Only call audit hooks
	if we are not loading a new audit library.
	* elf/dl-reloc (_dl_relocate_object): Third parameter is now a bitmask.
	Only use profiling trampoline for auditing if we are not relocating
	an audit library.
	* elf/dl-open.c (dl_open_worker): Adjust _dl_relocate_object call.
	* elf/rtld.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Adjust _dl_relocate_object prototype.
2009-03-16 02:16:30 +00:00
Ulrich Drepper
7e34260365 * elf/rtld.c (dl_main): Extend help message for --audit option. 2009-03-16 00:12:20 +00:00
Ulrich Drepper
a42ad61bae * elf/dl-runtime.c (reloc_offset): Define.
(reloc_index): Define.
	(_dl_fixup): Rename reloc_offset parameter to reloc_arg.
	(_dl_fixup_profile): Likewise.  Use reloc_index instead of
	computing index from reloc_offset.
	(_dl_call_pltexit): Likewise.
	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve): Just pass
	the relocation index to _dl_fixup.
	(_dl_runtime_profile): Likewise for _dl_fixup_profile and
	_dl_call_pltexit.
	* sysdeps/x86_64/dl-runtime.c: New file.
2009-03-15 00:26:14 +00:00
Ulrich Drepper
f53713a8e7 * elf/dl-sysdep.c (_dl_show_auxv): Add support for AT_BASE_PLATFORM.
* elf/dl-sysdep.c (auxvars): Compress data structure.
2009-03-14 18:33:58 +00:00
Ulrich Drepper
425ce2edb9 * config.h.in (USE_MULTIARCH): Define.
* configure.in: Handle --enable-multi-arch.
	* elf/dl-runtime.c (_dl_fixup): Handle STT_GNU_IFUNC.
	(_dl_fixup_profile): Likewise.
	* elf/do-lookup.c (dl_lookup_x): Likewise.
	* sysdeps/x86_64/dl-machine.h: Handle STT_GNU_IFUNC.
	* elf/elf.h (STT_GNU_IFUNC): Define.
	* include/libc-symbols.h (libc_ifunc): Define.
	* sysdeps/x86_64/cacheinfo.c: If USE_MULTIARCH is defined, use the
	framework in init-arch.h to get CPUID values.
	* sysdeps/x86_64/multiarch/Makefile: New file.
	* sysdeps/x86_64/multiarch/init-arch.c: New file.
	* sysdeps/x86_64/multiarch/init-arch.h: New file.
	* sysdeps/x86_64/multiarch/sched_cpucount.c: New file.

	* config.make.in (experimental-malloc): Define.
	* configure.in: Handle --enable-experimental-malloc.
	* malloc/Makefile: Handle experimental-malloc flag.
	* malloc/malloc.c: Implement PER_THREAD and ATOMIC_FASTBINS features.
	* malloc/arena.c: Likewise.
	* malloc/hooks.c: Likewise.
	* malloc/malloc.h: Define M_ARENA_TEST and M_ARENA_MAX.
2009-03-13 23:53:18 +00:00
Ulrich Drepper
a99e59d771 * include/stdio.h (fmemopen): Add libc_hidden_proto.
* libio/fmemopen.c (fmemopen): Add libc_hidden_def.

	* elf/sprof.c: Avoid warning about multi-line comment.
2009-03-10 15:26:57 +00:00
Ulrich Drepper
40e2fc8b70 * elf/dl-load.c (open_verify): In case VALID_ELF_HEADER is
defined, allow additional data to be added using the optional
	MORE_ELF_HEADER_DATA macro.
	* sysdeps/unix/sysv/linux/ldsodefs.h (VALID_ELF_HEADER,
	VALID_ELF_OSABI, VALID_ELF_ABIVERSION, MORE_ELF_HEADER_DATA): Define.
2009-02-10 17:21:29 +00:00
Ulrich Drepper
cbbcaf2369 * debug/xtrace.sh: Unify translatable messages.
* elf/ldd.bash.in: Likewise.
	* elf/sprof.c: Likewise.
	* locale/programs/locale.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* nss/getent.c: Likewise.

2009-02-06  Joseph Myers  <joseph@codesourcery.com>

	* debug/pcprofiledump.c (print_version,
	argp_program_version_hook): New function.
	* elf/ldconfig.c (more_help): New function.
	(argp): Use it.
	* elf/sln.c (usage): New function.
	(main): Support --help and --version.
	* malloc/memusagestat.c (print_version): New function.
	(argp_program_version_hook): New variable.
	* nscd/nscd.c (more_help): New function.
	(argp): Use it.
	* posix/getconf.c (main): Send --version output to stdout.
	Support --help.
	* sunrpc/rpc_main.c (usage, options_usage): Take STREAM and STATUS
	arguments.  All callers changed.
	(print_version): New function.
	(parseargs): Support --help and --version.
	* sunrpc/rpcinfo.c (usage): Take STREAM argument.  All callers
	changed.
	(print_version): New function.
	(main): Use getopt_long.  Support --help and --version.
	* sysdeps/unix/sysv/linux/lddlibc4.c (main): Support --help and
	--version.

2009-02-06  Ulrich Drepper  <drepper@redhat.com>
2009-02-06 20:13:07 +00:00
Ulrich Drepper
7c8a67320e * elf/Makefile (ld.so): Adjust the sed script to insert _begin in to
newer linker scripts.
2009-01-31 00:21:15 +00:00
Ulrich Drepper
965cb60a21 * sysdeps/generic/dl-osinfo.h (_dl_setup_stack_chk_guard): Take
one parameter.  If non-NULL use it to initialize return value.
	(_dl_setup_pointer_guard): New function.
	* sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise.
	* sysdeps/generic/ldsodefs.h: Declare _dl_random.
	* elf/rtld.c (security_init): Pass _dl_random to
	_dl_setup_stack_chk_guard.  Call _dl_setup_pointer_guard to initialize
	pointer_chk_guard.
	* elf/dl-sysdep.c (_dl_random): New variable.
	(_dl_sysdep_start): Handle AT_RANDOM.
	(_dl_show_auxv): Likewise.
	* elf/dl-support.c (_dl_random): New variable.
	(_dl_aux_init): Handle AT_RANDOM.
	* csu/libc-start.c [!SHARED] (libc_start_main): Pass _dl_random
	to _dl_setup_stack_chk_guard.

	* elf/elf.h (AT_RANDOM): Define AT_BASE_PLATFORM and AT_RANDOM.
2009-01-11 04:44:06 +00:00
Ulrich Drepper
0f95322a5f (AT_RANDOM): Define AT_BASE_PLATFORM and AT_RANDOM. 2009-01-11 02:43:18 +00:00
Ulrich Drepper
d36ad87147 * posix/getconf.c: Update copyright year.
* nss/getent.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* catgets/gencat.c: Likewise.
	* csu/version.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/sprof.c (print_version): Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* nscd/nscd.c (print_version): Likewise.
	* debug/xtrace.sh: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/mtrace.pl: Likewise.
	* debug/catchsegv.sh: Likewise.
2009-01-02 08:47:18 +00:00
Roland McGrath
01a746457f * elf/elf.h (NT_386_IOPERM): New macro.
(NT_PPC_VSX): New macro.
2008-11-26 09:15:38 +00:00
Ulrich Drepper
41e25904a5 * elf/dl-tls.c (__tls_get_addr): After calling _dl_update_slotinfo
refetch dtv, as it might have changed.
	* elf/Makefile: Add rules to build and run tst-tls18.
	* elf/tst-tls18.c: New test.
	* elf/tst-tlsmod18a.c: New file.
2008-10-31 20:50:16 +00:00