Commit Graph

2157 Commits

Author SHA1 Message Date
Roland McGrath 82397ed6ea Do check-execstack test using readelf rather than a build-time C program. 2012-05-01 13:27:52 -07:00
Roland McGrath 82a79e7d18 Do check-textrel test using readelf rather than a build-time C program. 2012-05-01 13:27:11 -07:00
Andreas Schwab 6d5c57fabd Don't run tests when cross-compiling 2012-04-28 22:16:37 +02:00
Siddhesh Poyarekar ceab42c380 Parse hexadecimal and octal strings correctly
The current implementation of __strtoul_internal seems to only pretend
to support hex and octal strings by detecting a preceding 0x or 0 and
marking base as 8 or 16. When it comes to the actual processing of the
string, it only considers numeric values within, thus breaking hex
values that may have [a-f] in them. Fixed with this commit.
2012-04-25 12:27:03 +05:30
Roland McGrath 83bcd2361d Add flexibility to localplt-*.data files, using an awk script rather than diff to check the results. 2012-04-24 14:48:15 -07:00
Marek Polacek 750b5926bc Prevent warning in pldd. 2012-04-16 20:34:28 +02:00
H.J. Lu 34a27407f4 Check __ILP32__ instead of __LP64__
* elf/tst-auditmod1.c: Check __ILP32__ instead of __LP64__.
	* elf/tst-auditmod3b.c: Likewise.
	* elf/tst-auditmod4b.c: Likewise.
	* elf/tst-auditmod5b.c: Likewise.
	* elf/tst-auditmod6b.c: Likewise.
	* elf/tst-auditmod6c.c: Likewise.
	* elf/tst-auditmod7b.c: Likewise.
	* sysdeps/x86_64/ffsll.c (ffsl): Likewise.
	* sysdeps/x86_64/preconfigure.in: Likewise.
	* sysdeps/x86_64/preconfigure: Regenerated.
2012-04-13 16:24:17 -07:00
David S. Miller d7dd44133f Fix ld.so regression.
[BZ #13967]
	* elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Handle the case
	where the is a gap between DT_REL(A) and DT_JMPREL.
2012-04-10 17:47:59 -07:00
Siddhesh Poyarekar 73d65cc378 New ld.so argument --inhibit-ldcache to disable ld.so.cache lookup
It may sometimes be desirable to make the dynamic linker only pick up
libraries from the library path and rpath and not look at the
ld.so.cache that ldconfig generates. An example of such a use case is
the glibc testsuite where the dynamic linker must not be influenced by
any external paths or caches.

This change adds a new option --inhibit-ldcache that when used, tells
the dynamic linker to not use ld.so.cache even if it is available.
2012-04-11 00:13:52 +05:30
David S. Miller 5ed848f3d8 Handle some new sparc relocation types.
* elf/elf.h (R_SPARC_WDISP10): Define.
	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Handle
	R_SPARC_SIZE32.
	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Handle
	R_SPARC_SIZE64 and R_SPARC_H34.
2012-04-07 09:29:14 -07:00
Carlos O'Donell 96154cd892 Simplify _ELF_DYNAMIC_DO_RELOC after combining the old two defs.
* elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Simplify
	conditions and remove no longer applicable assertion.
2012-04-07 09:41:22 -04:00
David S. Miller 993eb0541c Reduce down to one definition of _ELF_DYNAMIC_DO_RELOC.
* elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Reduce down to one
	definition.
	* sysdeps/powerpc/powerpc32/dl-machine.h
	(ELF_MACHINE_PLTREL_OVERLAP): Delete.
	* sysdeps/s390/s390-32/dl-machine.h
	(ELF_MACHINE_PLTREL_OVERLAP): Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h
	(ELF_MACHINE_PLTREL_OVERLAP): Likewise.
	* sysdeps/sparc/sparc64/dl-machine.h
	(ELF_MACHINE_PLTREL_OVERLAP): Likewise.
2012-04-05 15:28:37 -07:00
David S. Miller ff9f1c5f32 Fix DL_DEBUG_UNUSED to elide the VDSO and handle PLT references properly.
* elf/rtld.c (dl_main): If DL_DEBUG_UNUSED is enabled, turn off
	lazy binding.
	* elf/dl-lookup (_dl_lookup_symbol_x): If DL_DEBUG_UNUSED, ignore
	undefined symbol errors.

	* elf/rtlc.c (dl_main): Skip VDSO when checking for unused
	DT_NEEDED entries.
2012-04-05 05:20:37 -04:00
H.J. Lu c8e43ba739 Add x32 support to dynamic linker audit 2012-03-21 17:14:49 -07:00
H.J. Lu eb96ffb07d Move stdio-common/_itoa.h to sysdeps/generic 2012-03-20 16:00:23 -07:00
H.J. Lu f1a77b01f4 Add x32 support to ldconfig 2012-03-16 15:20:45 -07:00
David S. Miller 2d2cd51564 Fix bugs in sparc PLT profiling register management, and add sparc sotruss support.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Protect local
	variables with appropriate CPP guards.
	* sysdeps/sparc/sparc32/dl-trampoline.S: Propagate the stack_ptr from the
	frame pointer, not the stack pointer.  Correct layout comments.  Fix test
	on resulting framesize and the management of the outregs buffer for pltexit.
	Preserve floating point return values across _dl_call_pltexit call.
	* sysdeps/sparc/sparc64/dl-trampoline.S: Fix test on resulting
	framesize and the management of the outregs buffer for pltexit.
	Preserve floating point return values across _dl_call_pltexit
	call.
	* elf/sotruss-lib.c (la_sparc32_gnu_pltenter, la_sparc64_gnu_pltenter,
	la_sparc32_gnu_pltexit, la_sparc64_gnu_pltexit): New functions.
	(print_exit): Fix format string for return register value.
2012-03-09 20:48:06 -08:00
Ulrich Drepper a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Marek Polacek 1f393a11f6 Always set l_used for vDSO. 2012-02-29 15:28:38 +01:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Richard Henderson 57b957eb04 Avoid pointer type mismatch warning.
update_get_addr returns a link_map*, but the return expression
was of type char*.  Fix by relying on gcc's void* arithmetic
extension and auto-conversion from void*.
2012-02-09 11:20:27 -08:00
Ulrich Drepper 0eb6f47528 Merge branch 'master' of ssh://sourceware.org/git/glibc
Conflicts:
	ChangeLog
2012-01-30 22:34:33 -05:00
Ulrich Drepper 27a25b6e63 Optimize __get_tls_addr a bit
Rearrange code to avoid creation of a stack frame.  At least on x86-64
the code for the fast path should be down to the bare minimum.
2012-01-30 22:32:05 -05:00
Chris Metcalf 3ac8b282b6 Add Tile relocation types. 2012-01-30 09:54:13 -08:00
Ulrich Drepper 6ee65ed6dd Sort objects before relocations 2012-01-27 15:05:19 -05:00
Ulrich Drepper 6ac2f2df75 Fix comment 2012-01-27 11:25:18 -05:00
Joseph Myers bdb6de1d6d Remove gets declarations in C++ tests. 2012-01-25 16:50:17 +00:00
Ulrich Drepper ec09c1c410 Optimize xmalloc, xcalloc, xrealloc, and xstrdup
Add alloc_size attribute and apply consistently the malloc attribute
to xmalloc, xcalloc, xrealloc, and xstrdup.
2012-01-08 21:19:43 -05:00
Ulrich Drepper 2119dcfacc Static linking is always needed 2012-01-08 09:52:29 -05:00
Ulrich Drepper a784e50247 Remove pre-ISO C support
No more __const.
2012-01-07 23:57:22 -05:00
Ulrich Drepper 0269750ca6 Remove non-ELF support 2012-01-07 20:30:26 -05:00
Ulrich Drepper 664f8cb9d5 More IA-64 removal 2012-01-07 12:55:20 -05:00
Ulrich Drepper 28926a1be1 Add explicit declaration of gets in C++ code 2012-01-07 10:37:50 -05:00
Ulrich Drepper a316c1f682 Also update new programs 2012-01-01 07:16:32 -05:00
Ulrich Drepper 81fb02b046 Update copyright year 2012-01-01 05:50:05 -05:00
Marek Polacek 2b2596b1e9 Add missing inline keyword
According to http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00608.html,
a function without `inline' with an `always_inline' attribute is a bug.
2011-12-23 11:19:53 -05:00
Ulrich Drepper 3a2edc79ed Fix warning in __dl_iterate_phdr 2011-11-12 01:49:14 -05:00
Andreas Schwab 10fb0bfab1 Fix off-by-one when reading link name in sprof 2011-11-04 10:25:00 +01:00
Andreas Schwab 647776f663 Account for alloca size rounding in extend_alloca 2011-11-01 18:29:34 +01:00
Paul Pluzhnikov 02f9c6cfe2 Use extend_alloca in _dl_map_object_deps. 2011-10-31 16:27:54 -07:00
Ulrich Drepper 09e1869773 Typo in last checkin 2011-10-29 14:05:49 -04:00
Ulrich Drepper c9aafacee4 Correctly NUL-terminate link name in sprof 2011-10-29 12:51:53 -04:00
Ulrich Drepper d272e7f19d Cleanups in ldconfig's chroot handling 2011-10-29 12:43:18 -04:00
Ulrich Drepper 1bc3307181 Avoid warning in dl-lookup.c 2011-10-29 12:40:55 -04:00
Thomas Jarosch 1760874da6 Fix readlink call in ldconfig's chroot handling 2011-10-29 12:24:38 -04:00
Andreas Schwab 16437fece4 Small optimization of dependency sorting 2011-10-25 13:33:12 +02:00
Andreas Schwab d45c60c2fe Preserve link time dependencies over relocation dependencies 2011-10-20 12:03:14 +02:00
Ulrich Drepper ad0f5cad15 Use rounds{s,d} for x86 rint, ceil, floor 2011-10-16 20:58:17 -04:00
Ulrich Drepper aac13307d6 Cleanup last patch 2011-10-16 10:24:02 -04:00
Ulrich Drepper e453f6cd0c Fix potential problem with skipping relocations
We never seem to have hit this problem but way relative relocations
were skipped was wrong.  There are relative relocations only in the
DT_REL/DT_RELA section.  The elf_dynamic_do_##reloc function skipped
the entries in all calls, though.
2011-10-16 09:34:51 -04:00
Ulrich Drepper cdf2901f5e Remove leftover debug message from pldd 2011-10-14 23:51:20 -04:00
Marek Polacek fde56e5cc5 elf/dl-load.c: Avoid warning 2011-10-07 11:00:13 -04:00
Andreas Schwab 3a62d00d40 Don't call ifunc functions in trace mode 2011-10-05 14:35:40 +02:00
Andreas Schwab 48b67d71ec Also relocate in dependency order when doing symbol dependency testing 2011-09-14 13:29:24 +02:00
Andreas Schwab 52d4fef8be Fix pattern on $(ldd-rewrite-script) substitution 2011-09-13 10:29:43 +02:00
Andreas Schwab 995a80dfbc Only use USE___THREAD when defined 2011-09-13 10:21:47 +02:00
Ulrich Drepper 037e9fe21c Revert "Remove last use of USE___THREAD"
This reverts commit de82006d43.

Conflicts:

	ChangeLog
2011-09-12 16:20:40 -04:00
Andreas Schwab de82006d43 Remove last use of USE___THREAD 2011-09-12 13:37:57 +02:00
Andreas Schwab 0f31fe7791 Prepend $(..) to $(ldd-rewrite-script) if non-absolute 2011-09-11 20:34:57 +02:00
Ulrich Drepper 32b4c8393f Provide static initializer for _dl_pagesize in statically linked code 2011-09-11 11:25:51 -04:00
Ulrich Drepper 02d46fc4b9 Simplify malloc initialization
Singificantly reduce the code needed at malloc initialization.  In
the process getpagesize is simplified by always initializing
GLRO(dl_pagesize).
2011-09-10 21:47:36 -04:00
Ulrich Drepper d063d16433 Remove support for !USE___THREAD 2011-09-10 16:50:28 -04:00
Ulrich Drepper 3ce1f29594 Cleanup of configuration options
Make several tool features mandatory and simplify the code.
2011-09-10 14:34:15 -04:00
Roland McGrath 0a2349f929 Define ELFOSABI_GNU. 2011-09-09 10:11:49 -07:00
Ulrich Drepper 633e9e0fc2 Fix sotruss help messages 2011-09-09 12:31:43 -04:00
Ulrich Drepper 74718d13e4 Fill in real information in __dl_iterate_phdr 2011-09-09 09:43:43 -04:00
Andreas Jaeger f992478091 Fix warning in elf/sprof.c 2011-09-08 23:41:41 -04:00
Andreas Schwab 610f9ab43e Fix crash during error handling 2011-09-08 12:03:11 +02:00
Ulrich Drepper b49865be8e Use O_CLOEXEC when loading objects in ld.so 2011-09-08 00:00:01 -04:00
Ulrich Drepper fdc86bc9a8 Pass back error code from dlerror_run 2011-09-07 23:50:40 -04:00
Ulrich Drepper c966526aa4 Fix memory leak in case of failed dlopen 2011-09-07 22:58:47 -04:00
Ulrich Drepper 6585cb60ee Remove unused parameter in pldd and simplify ELF handling 2011-09-05 21:49:14 -04:00
Ulrich Drepper 554881ef20 Use O_CLOEXEC when loading ld.so cache 2011-09-05 17:18:38 -04:00
David S. Miller 5f4318d102 Sanitize HWCAP_SPARC_* defines/usage, and add new entries. 2011-09-01 13:43:06 -07:00
Andreas Schwab 2bc174332b Relocate objects in dependency order 2011-08-30 15:37:54 +02:00
Andreas Schwab 39dd69dfb9 Fix scope handling during dl_close 2011-08-24 09:32:13 +02:00
Ulrich Drepper 304c6e0b2c Merge branch 'master' of ssh://sourceware.org/git/glibc
Conflicts:
	ChangeLog
2011-08-22 16:10:16 -04:00
Andreas Schwab e888bcbe4f Correct cycle detection during dependency sorting 2011-08-22 16:08:16 -04:00
Andreas Schwab f55ffe58e9 Revert "Don't crash when dependencies are missing"
This reverts commit f2092faf2b.
2011-08-22 10:58:42 +02:00
Ulrich Drepper 001f0a6c7c Print message that there is no scope instead of being silent 2011-08-20 15:16:42 -04:00
Ulrich Drepper 49c74ba90e Further improve printing os ELF symbol lookup scope information 2011-08-20 12:59:45 -04:00
Ulrich Drepper c5305d88c7 Fix some problem of 32-bit pldd on 64-bit platforms 2011-08-17 10:31:15 -04:00
Ulrich Drepper 2772459841 Prevent possible race conditions by attaching pldd to all threads 2011-08-17 09:41:23 -04:00
Ulrich Drepper 174baab3f9 Improve printing of lookup scopes
The scope of a new object should be printed earlier and when the scope
of an already loaded object is extended only the changes should be
printed.
2011-08-16 16:11:03 -04:00
Ulrich Drepper f0f47fa064 Avoid warning from last change 2011-08-16 12:35:28 -04:00
Ulrich Drepper 076fe0152b Fix printing of scope number 2011-08-16 11:17:15 -04:00
Roland McGrath 5e4287d16f Warning patrol. 2011-08-14 15:59:11 -07:00
Ulrich Drepper 73d7af4f4c Implement LD_DEBUG=scopes 2011-08-13 22:24:08 -04:00
Ulrich Drepper 1dc277048c Fix caller information of NSS modules 2011-08-13 12:47:47 -04:00
Ulrich Drepper 07df30d995 Better check for last patch
Don't indicate that dependencies of dynamically loaded objects are
also dynamically loaded.
2011-08-12 13:32:10 -04:00
Ulrich Drepper 9ac533d31b Better debug information from ld.so
Differentiate between loading as a dependency and loading on request.
2011-08-12 13:20:11 -04:00
Ulrich Drepper 5644ef5461 Fix check for AVX enablement
The AVX bit is set if the CPU supports AVX.  But this doesn't mean the
kernel does.  Add checks according to Intel's documentation.
2011-07-20 21:21:03 -04:00
Marek Polacek c8835729b8 _dl_sort_fini: Remove unused argument 2011-07-19 20:27:43 -04:00
Marek Polacek 8991e135f7 elf/cache.c: Remove unnecessary condition 2011-07-19 20:17:51 -04:00
Roland McGrath a6928d5102 Fix remaining explicit uses of shlib.lds to use $(shlib-lds). 2011-07-14 20:49:27 -07:00
Roland McGrath 31fffa6b07 Make asserts accept DT_FLAGS/DT_FLAGS_1 with zero flags. 2011-07-02 15:12:19 -07:00
Roland McGrath 4e34ac6a1e Use -defsym=_begin=0 instead of linker script munging. 2011-07-02 15:11:43 -07:00
Roland McGrath 78a7eee7fa Fix missing .ctors/.dtors lead word in soinit 2011-06-27 20:26:54 -07:00
Ulrich Drepper 68468076c2 We don't use linkobj/libc.so at runtmie, no need to check for text rels
This also works around a toolchain issu.
2011-06-26 03:04:07 -04:00
Ulrich Drepper b36b153d5d Revert unwanted patch 2011-06-21 12:40:22 -04:00
Ulrich Drepper 75d39ff212 Add missing DL_CALL_FCT 2011-06-21 11:23:25 -04:00
David S. Miller 42675c6ff0 Add an elf_ifunc_invoke interface so that architectures can implement
the ifunc resolver calls however they wish.
2011-06-20 19:56:40 -07:00
Roland McGrath decd4e50b6 Better detect total failure of linker script generation. 2011-06-10 23:37:35 -07:00
Roland McGrath 5615eaf264 Quash some new warnings from GCC 4.6. 2011-06-10 22:44:20 -07:00
Roland McGrath b350afabd9 Revert -r -> -Wl,-r change. 2011-06-10 10:34:45 -07:00
Roland McGrath 28368601e3 Use -Wl,-r instead of plain -r. 2011-06-09 17:07:50 -07:00
Ulrich Drepper 11988f8f96 Add pldd program 2011-06-09 07:06:21 -04:00
Ulrich Drepper 6b1e7d1992 Handle DSOs without any dependency in ld.so 2011-05-30 12:31:25 -04:00
Ulrich Drepper 4997db7429 One more thinko in CL 2011-05-30 11:57:50 -04:00
Ulrich Drepper 01f16ab0a5 Prevent loader from loading itself 2011-05-30 01:55:40 -04:00
Ulrich Drepper 0464f746e8 Don't build AVX tests with old compilers 2011-05-29 21:25:58 -04:00
Ulrich Drepper b0316e569f Fix bug in last checkin which left ldd uninstalled 2011-05-28 14:22:06 -04:00
Ulrich Drepper a917104752 Add sotruss program 2011-05-28 13:20:12 -04:00
Ulrich Drepper de7ce8f171 Fix flags parameter value passed to pltenter and pltexit 2011-05-22 21:30:31 -04:00
Martin von Gagern d26dfc60ed Fix handling of static TLS in dlopen'ed objects
When dynamically loading a library along with several dependencies, calls to
_dl_add_to_slotinfo and _dl_update_slotinfo can become intermixed. As a
consequence, _dl_update_slotinfo will update the generation counter of the dtv
although not all of the slots belonging to that generation have been added.
Subsequent calls to _dl_add_to_slotinfo will add more slots to the same
generation, for which no storage will be allocated, as the dtv generation
checks will claim no work is necessary. This will lead to uninitialized dtv
entries and will likely cause a SIGSEGV when thread local variables are
accessed.
2011-05-14 21:25:43 -04:00
Andreas Schwab da62f81bdd Add support for generated PIE link rules 2011-05-13 23:31:43 -04:00
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
Ulrich Drepper 60a23f5a72 * elf/Makefile: Add rules to build and run tst-tls17.
* elf/tst-tls17.c: New test.
	* elf/tst-tlsmod17a.c: New file.
	* elf/tst-tlsmod17b.c: Likewise.
2008-10-17 15:24:10 +00:00
Ulrich Drepper 292eb8177e * stdlib/divmod_1.c: Use correct type for dummy variable.
* stdlib/mod_1.c: Likewise.
2008-10-17 08:38:08 +00:00
Ulrich Drepper fb862ace67 (_dl_update_slotinfo): Copy all of the initial DTV. 2008-10-16 21:45:59 +00:00
Roland McGrath 9e50e09d4f 2008-10-01 Mark Shinwell <shinwell@codesourcery.com>
* elf/elf.h (STO_MIPS_PLT): New.
	(R_MIPS_COPY): New.
	(R_MIPS_JUMP_SLOT): New.
	(R_MIPS_NUM): Redefine to 128.
	(DT_MIPS_PLTGOT): New.
	(DT_MIPS_RWPLT): New.
	(DT_MIPS_NUM): Redefine to 0x35.
2008-10-01 19:41:34 +00:00
Roland McGrath 13074b5b5a * Makefile (check-data): Check data directory in add-ons.
* elf/Makefile (check-data): Likewise.
2008-08-19 00:19:03 +00:00
Ulrich Drepper 9cf73ab08a * sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): Undo all
change related to AT_EXECFN.  We cannot use that string.
	* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
	_dl_execfn member.
	* elf/dl-support.c: Remove _dl_execfn variable.
	(_dl_aux_init): Remove handling of AT_EXECFN.
	* elf/dl-sysdep.c (_dl_sysdep_start): Remove handling of AT_EXECFN.
	* elf/rtld.c (process_envvars): Remove use of __ASSUME_AT_EXECFN.
2008-08-14 17:11:07 +00:00
Ulrich Drepper 17756df399 * elf/Makefile (check-localplt.out): Also check libresolv and
libcrypt.
2008-08-01 07:51:52 +00:00
Roland McGrath bd3314aac3 2008-07-28 Roland McGrath <roland@redhat.com>
* elf/dl-sysdep.c (_dl_show_auxv): Add AT_EXECFN to the table.
2008-07-29 01:18:26 +00:00
Ulrich Drepper 7b91359b2c * Makeconfig: Define pie-ccflag and PIE-ccflag variables.
* elf/Makefile: Use pie-ccflag variable.
	* nscd/Makefile: Likewise.
	* sysdeps/sparc/Makefile: Set $(pie-ccflag) to -fPIE.
2008-07-26 22:22:24 +00:00
Ulrich Drepper ff0bf75374 * sunrpc/clnt_udp.c (__libc_clntudp_bufcreate): Namespace cleanup.
* elf/dl-load.c (local_strdup): Remove inline.
	(_dl_map_object_from_fd): Don't allocate l_symbolic_searchlist.r_list.
	* elf/dl-object.c (_dl_new_object): Allocate symbolic searchlist as
	part of the object.

	* sysdeps/unix/sysv/linux/dl-origin.c: Add const to avoid warning.
2008-07-26 08:42:54 +00:00
Ulrich Drepper 0e077a7eea * elf/elf.h: Define AT_EXECFN.
* elf/rtld.c [!__ASSUME_AT_EXECFN] (process_envvars): Don't handle
	LD_ORIGIN_PATH.
	* elf/dl-sysdep.c (_dl_sysdep_start): Handle AT_EXECFN.
	* elf/dl-support.c: Define _dl_execfn.  Don't define _dl_origin_path
	if __ASSUME_AT_EXECFN is defined.
	(_dl_aux_init): Handle AT_EXECFN.
	* sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_AT_EXECFN
	for 2.6.27 and up.
	* sysdeps/generic/ldsodefs.h (rtld_global_ro): Add _dl_execfn.
	Don't define _dl_origin_path if __ASSUME_AT_EXECFN is defined.
	* sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): Use
	_dl_execfn if available and avoid compatibility code if
	__ASSUME_AT_EXECFN is defined.
2008-07-24 18:33:44 +00:00
Roland McGrath e85f1d6af4 * shlib-versions (sparc.*-.*-.*, sparc64.*-.*-.*): Add ABI lines.
* Makefile (check-data): Use $(abi-name) before other guesses.
	Look in $(add-ons) dirs before scripts/data/.
	* elf/Makefile (check-data): Likewise.

	* scripts/soversions.awk: Grok ABI line.
	* Makeconfig ($(common-objpfx)soversions.mk): Likewise.
	Emit definition for abi-name variable.

	if [__USE_BSD].
2008-05-22 00:04:21 +00:00
Jakub Jelinek 84aacd93b4 * elf/soinit.c (__EH_FRAME_BEGIN__): Remove.
2008-05-19  Jakub Jelinek  <jakub@redhat.com>

	* elf/soinit.c (__EH_FRAME_BEGIN__): Remove.
2008-05-19 18:43:36 +00:00
Ulrich Drepper c9ff0187a6 Introduce TLS descriptors for i386 and x86_64.
* include/inline-hashtab.h: New file, copied from 2005's
	libiberty, with fix for memory leak imported afterwards by
	Glauber de Oliveira Costa.
	* elf/tlsdeschtab.h: New file.
	* elf/dl-reloc.c (_dl_try_allocate_static_tls): Extract from...
	(_dl_allocate_static_tls): ... here.  Rearrange failure path.
	(CHECK_STATIC_TLS): Move to...
	* elf/dynamic-link.h: ... this file.
	(TRY_STATIC_TLS): New macro.
	* elf/dl-conflict.c (CHECK_STATIC_TLS, TRY_STATIC_TLS): Override.
	* elf/elf.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL,
	R_386_TLS_DESC): Define.
	(R_X86_64_PC64, R_X86_GOTOFF64, R_X86_64_GOTPC32): Merge from
	binutils.
	(R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
	R_X86_64_TLSDESC): Define.
	(R_386_NUM, R_X86_64_NUM): Adjust.
	* sysdeps/i386/Makefile (sysdep-dl-routines, sysdep_routines,
	systep-rtld-routines): Add tlsdesc and dl-tlsdesc for elf subdir.
	(gen-as-const-headers): Add tlsdesc.sym to csu subdir.
	* sysdeps/i386/dl-lookupcfg.h: New file.  Introduce _dl_unmap to
	release tlsdesc_table.
	* sysdeps/i386/dl-machine.h: Include dl-tlsdesc.h.
	(elf_machine_type_class): Mark R_386_TLS_DESC as PLT class.
	(elf_machine_rel): Handle R_386_TLS_DESC.
	(elf_machine_rela): Likewise.
	(elf_machine_lazy_rel): Likewise.
	(elf_machine_lazy_rela): Likewise.
	* sysdeps/i386/dl-tls.h (struct dl_tls_index): Name it.
	* sysdeps/i386/dl-tlsdesc.S: New file.
	* sysdeps/i386/dl-tlsdesc.h: New file.
	* sysdeps/i386/tlsdesc.c: New file.
	* sysdeps/i386/tlsdesc.sym: New file.
	* sysdeps/i386/bits/linkmap.h (struct link_map_machine): Add
	tlsdesc_table.
	* sysdeps/x86_64/Makefile (sysdep-dl-routines, sysdep_routines,
	systep-rtld-routines): Add tlsdesc and dl-tlsdesc for elf subdir.
	(gen-as-const-headers): Add tlsdesc.sym to csu subdir.
	* sysdeps/x86_64/dl-lookupcfg.h: New file.  Introduce _dl_unmap to
	release tlsdesc_table.
	* sysdeps/x86_64/dl-machine.h: Include dl-tlsdesc.h.
	(elf_machine_runtime_setup): Set up lazy TLSDESC GOT entry.
	(elf_machine_type_class): Mark R_X86_64_TLSDESC as PLT class.
	(elf_machine_rel): Handle R_X86_64_TLSDESC.
	(elf_machine_rela): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/x86_64/dl-tls.h (struct dl_tls_index): Name it.
	(__tls_get_addr): Do not declare for non-shared compiles.
	* sysdeps/x86_64/dl-tlsdesc.S: New file.
	* sysdeps/x86_64/dl-tlsdesc.h: New file.
	* sysdeps/x86_64/tlsdesc.c: New file.
	* sysdeps/x86_64/tlsdesc.sym: New file.
	* sysdeps/x86_64/bits/linkmap.h (struct link_map_machine): Add
	tlsdesc_table for both 32- and 64-bit structs.
2008-05-13 05:41:30 +00:00
Ulrich Drepper a3636e8b89 * elf/dl-tls.c (__tls_get_addr): Optimize by moving slow path in
its own function.  This reduces the frame setup costs and more.
2008-05-12 05:36:02 +00:00
Ulrich Drepper cf3a8c7f42 * elf/tls-macros.h (__TLS_GET_ADDR): Define according to the ABI
in use.
	(TLS_LD): Use __TLS_GET_ADDR instead of .__tls_get_addr.
	(TLS_GD): Likewise.
2008-04-11 21:04:10 +00:00
Ulrich Drepper 9fb11d4c6e * elf/Makefile (tests): Substitute tests-vis-yes here.
(tests-vis-yes): Delete.
	(modules-name, modules-vis-yes): Similarly.
2008-04-10 05:02:48 +00:00
Ulrich Drepper 72e6cdfa2c Remove useless "if" before "free". 2008-03-19 06:43:34 +00:00
Ulrich Drepper 368a8dec0a * sysdeps/unix/sysv/linux/dl-sysdep.c: Avoid unnecessary code for
.o file.
	* elf/Makefile (routines): Add dl-sysdep.
	(elide-routines.os): Likewise.
2008-03-08 17:52:13 +00:00
Ulrich Drepper 7c22c7ec9a [BZ #5786]
* elf/dl-sysdep.c: Undefine ROUND after use.
	* sysdeps/generic/ldsodefs.h [HAVE_DL_DISCOVER_OSVERSION]
	(struct rtld_global_ro): Add _dl_tls_get_addr_soft element.
	* elf/rtld.c (rtld_global_ro): Initialize _dl_discover_osversion.
	* sysdeps/unix/sysv/linux/dl-osinfo.h: Move _dl_discover_osversion
	to ...
	* sysdeps/unix/sysv/linux/dl-sysdep.c: ...here.
	* sysdeps/unix/sysv/linux/dl-sysdep.h: Declare _dl_discover_osversion
	if necessary.
	* sysdeps/unix/sysv/linux/sysconf.c: Handle _SC_ARG_MAX here.
2008-03-08 07:35:10 +00:00
Ulrich Drepper 93025f9373 * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Add
_dl_tls_get_addr_soft element.
	* elf/rtld.c (rtld_global_ro): Initialize _dl_tls_get_addr_soft.
	* elf/Versions (ld): Don't export _dl_tls_get_addr_soft.
	* dlfcn/dlinfo.c (dlinfo_doit): Access dl_tls_get_addr_soft through
	GLRO.
	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
	* elf/dl-tls.c (_dl_tls_get_addr_soft): Use attribute_hidden instead
	of internal_function.
2008-03-08 05:44:56 +00:00
Roland McGrath a0a7cc65ad 2008-02-19 Roland McGrath <roland@redhat.com>
* elf/elf.h (SHT_GNU_ATTRIBUTES): New macro.
2008-02-20 03:33:33 +00:00
Roland McGrath 85202a2b7e * elf/elf.h (NT_PPC_SPE): New macro. 2008-02-09 01:45:01 +00:00
Roland McGrath bc96ecbf4d 2008-01-30 Roland McGrath <roland@redhat.com>
* elf/elf.h (NT_386_TLS): New macro.
2008-01-30 22:09:01 +00:00
Roland McGrath 16cd816fd0 * Makeconfig (sysd-rules-patterns): New variable.
* Makerules ($(common-objpfx)sysd-rules): Drive the loop from that.
	(check-inhibit-asm): New canned sequence, replaces ...
	(open-check-inhibit-asm, close-check-inhibit-asm): ... these, removed.
	* elf/rtld-Rules ($(objpfx)rtld-%.os): Use $(rtld-CPPFLAGS) in commands.
	(rtld-CPPFLAGS): Renamed from CPPFLAGS-rtld.
	(CFLAGS-rtld): Variable removed.
2008-01-30 00:24:16 +00:00
Ulrich Drepper 4c533566c2 * include/link.h (FORCED_DYNAMIC_TLS_OFFSET): Define.
* elf/dl-close.c (_dl_close): Check for it.
	* elf/dl-reloc.c (CHECK_STATIC_TLS): Likewise.
	(_dl_allocate_static_tls): Likewise.
	* elf/dl-tls.c (_dl_allocate_tls_init): Likewise.
	(__tls_get_addr): Protect from race conditions in setting l_tls_offset
	to it.
	* elf/tst-tls16.c: New file.
	* elf/tst-tlsmod16a.c: New file.
	* elf/tst-tlsmod16b.c: New file.
	* elf/Makefile: Add rules to build and run tst-tls16.
2008-01-17 20:20:00 +00:00
Ulrich Drepper f4a1363eb3 * 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.
2008-01-02 19:26:03 +00:00
Ulrich Drepper d9961b6a4f * elf/tst-execstack.c (do_test): Don't fail if SELinux forbids
executable stacks.
2007-12-17 00:00:57 +00:00
Ulrich Drepper b92e378086 * elf/rtld.c (dl_main): Use the page size to find the map start. 2007-11-06 01:12:33 +00:00
Ulrich Drepper 4c48ef06b4 * elf/rtld.c (dl_main): Initialize stack and pointer guard early
when using auditing libraries.
2007-10-31 15:28:30 +00:00
Ulrich Drepper 88197030d5 [BZ #5222]
2007-10-28  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5222]
	* elf/dl-load.c (_dl_rtld_di_serinfo): Correct handling of short
	path elements in counting mode.
2007-10-28 08:24:07 +00:00
Roland McGrath 0a80eb74fd 2007-10-19 Roland McGrath <roland@redhat.com>
* elf/Makefile ($(objpfx)ld.so): Use $(AWK).
	* scripts/check-errnos.sh: Likewise.
2007-10-20 00:54:16 +00:00
Jakub Jelinek 46ae88502d 2007-10-06 David S. Miller <davem@davemloft.net>
* configure.in: Add sparcv9v2 and sparc64v2.
	* scripts/config.sub: Likewise.
	* configure: Regenerate.
	* elf/elf.h (HWCAP_SPARC_N2): New.
	* sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Bump to 8.
	* sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add 'v9v2'.
	(HWCAP_IMPORTANT): Add HWCAP_SPARC_N2.
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v2/memcpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v2/memset.S: New file.
	* sysdeps/sparc/sparc64/sparcv9v2/memcpy.S: New file.
	* sysdeps/sparc/sparc64/sparcv9v2/memset.S: New file.
2007-10-06  David S. Miller  <davem@davemloft.net>

	* configure.in: Add sparcv9v2 and sparc64v2.
	* scripts/config.sub: Likewise.
	* configure: Regenerate.
	* elf/elf.h (HWCAP_SPARC_N2): New.
	* sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Bump to 8.
	* sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add 'v9v2'.
	(HWCAP_IMPORTANT): Add HWCAP_SPARC_N2.
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v2/memcpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/sparcv9v2/memset.S: New file.
	* sysdeps/sparc/sparc64/sparcv9v2/memcpy.S: New file.
	* sysdeps/sparc/sparc64/sparcv9v2/memset.S: New file.
2007-10-19 06:59:33 +00:00
Roland McGrath 6368c0bcea 2007-10-18 Roland McGrath <roland@redhat.com>
* elf/elf.h (NT_PPC_VMX): New macro.
2007-10-18 08:49:44 +00:00
Ulrich Drepper 78d6dd72e5 (save_aux_cache): Free memory allocated for temporary file name. 2007-10-13 05:21:59 +00:00
Ulrich Drepper 0304f168ce [BZ #5104]
* elf/do-lookup.h (do_lookup_x): Don't ignore STT_COMMON symbols.
2007-10-05 21:25:32 +00:00
Ulrich Drepper 385b4cf4c5 * sysdeps/generic/ldsodefs.h (struct dl_scope_free_list): Store
void * pointers instead of struct link_map **.
	(_dl_scope_free): Change argument type to void *.
	* include/link.h (struct link_map): Change type of l_reldeps
	to struct link_map_reldeps, move l_reldepsact into that
	struct too.
	* elf/dl-deps.c: Include atomic.h.
	(_dl_map_object_deps): Only change l->l_initfini when it is
	fully populated, use _dl_scope_free for freeing it.  Optimize
	removal of libs from reldeps by using l_reserved flag, when
	some removal is needed, allocate a new list instead of
	reallocating and free the old with _dl_scope_free.  Adjust
	for l_reldeps and l_reldepsact changes.
	* elf/dl-lookup.c (add_dependency): Likewise.  Reorganize to allow
	searching in l_initfini and l_reldeps without holding dl_load_lock.
	* elf/dl-fini.c (_dl_sort_fini): Adjust for l_reldeps and
	l_reldepsact changes.
	* elf/dl-close.c (_dl_close_worker): Likewise.
	* elf/dl-open.c (_dl_scope_free): Change argument type to void *.
2007-09-29 06:58:31 +00:00
Ulrich Drepper 715899d122 * elf/dl-lookup.c (add_dependency): Handle failing memory
allocation for dependency list.  Remove unnecessary check.
2007-09-19 22:22:51 +00:00
Ulrich Drepper b90395e6e9 * sysdeps/generic/ldsodefs.h (DL_LOOKUP_GSCOPE_LOCK): New definition.
* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Or in
	DL_LOOKUP_GSCOPE_LOCK into flags after THREAD_GSCOPE_SET_FLAG ().
	* elf/dl-sym.c (do_sym): Likewise.
	* include/link.h (struct link_map): Add l_serial field.
	* elf/dl-object.c (_dl_new_object): Initialize l_serial.
	* elf/dl-lookup.c (add_dependency): Add flags argument.
	Remember map->l_serial, if DL_LOOKUP_GSCOPE_LOCK is among
	flags, use THREAD_GSCOPE_RESET_FLAG before and
	THREAD_GSCOPE_SET_FLAG after
	__rtld_lock_lock_recursive (GL(dl_load_lock)) to avoid deadlock.
	Don't dereference map until it has been found on some list.
	If map->l_serial changed, return -1.
2007-09-18 19:20:56 +00:00
Ulrich Drepper 0b82ff747e * elf/elf.h: Define R_PARISC_PLABEL21L, R_PARISC_PLABEL14R,
R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT, R_PARISC_TLS_GD21L,
	R_PARISC_TLS_GD14R, R_PARISC_TLS_GDCALL, R_PARISC_TLS_LDM21L,
	R_PARISC_TLS_LDM14R, R_PARISC_TLS_LDMCALL, R_PARISC_TLS_LDO21L,
	R_PARISC_TLS_LDO14R, R_PARISC_TLS_DTPMOD32, R_PARISC_TLS_DTPMOD64,
	R_PARISC_TLS_DTPOFF32, R_PARISC_TLS_DTPOFF64, R_PARISC_TLS_LE21L,
	R_PARISC_TLS_LE14R, R_PARISC_TLS_IE21L, R_PARISC_TLS_IE14R,
	R_PARISC_TLS_TPREL32, R_PARISC_TLS_TPREL64.
2007-08-21 14:14:25 +00:00
Ulrich Drepper d979c2f1e6 (do_lookup_x): Minimal improvement in hash lookup loop. 2007-08-21 14:05:39 +00:00
Jakub Jelinek cb84d1e403 * elf/Makefile ($(objpfx)ld.so): Use readelf -s and awk instead of nm -u
to check for undefined symbols.
	* elf/Makefile ($(objpfx)ld.so): Use readelf -s and awk instead of nm -u
	to check for undefined symbols.
2007-08-16 21:20:11 +00:00
Ulrich Drepper c6c8f0eca3 * elf/dl-misc.c: Undo last change. The kernel won't allow it. 2007-08-14 18:54:27 +00:00
Ulrich Drepper ea37207af1 * elf/dl-dst.h: No need for _dl_dst_count, _dl_dst_substitute,
and _dl_get_origin defines anymore.
2007-08-13 05:01:42 +00:00
Ulrich Drepper 3c87d79db7 * sysdeps/unix/sysv/linux/x86_64/libc-start.c
(_libc_vdso_platform_setup): Mangle function pointers before storing
	them.
	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (INLINE_VSYSCALL):
	Demangle vdso pointer before use.
	(INTERNAL_VSYSCALL): Likewise.

	* elf/cache.c (primes): Mark as const.
	Noted by Roland McGrath.
2007-08-13 00:23:59 +00:00
Ulrich Drepper 27d9ffda17 2007-08-01 Andreas Jaeger <aj@suse.de>
Jakub Jelinek  <jakub@redhat.com>

	* elf/ldconfig.c (opt_ignore_aux_cache): Add new option.
	(options): Add option.
	(parse_opt): Handle option.
	(manual_link): Adjust process_file caller.  Call implicit_soname.
	(search_dir): Formatting.  Use and populate auxiliary cache.
	(main): Load and save auxiliary cache.
	* elf/readlib.c (process_file): Add stat_buf argument.  Pass struct
	stat64 from fstat64 to caller.
	(implicit_soname): New function.
	* elf/readelflib.c (process_elf_file): If DT_SONAME is not present,
	leave *soname as NULL.
	* elf/cache.c: Include libgen.h.
	(print_entry, print_cache, compare, save_cache, add_to_cache):
	Formatting and cleanups.
	(aux_cache_entry_id, aux_cache_entry, aux_cache_file_entry,
	aux_cache_file): New structures.
	(AUX_CACHEMAGIC): Define.
	(primes): New array.
	(aux_hash_size, aux_hash): New variables.
	(aux_cache_entry_id_hash, nextprime, init_aux_cache,
	search_aux_cache, insert_to_aux_cache, add_to_aux_cache,
	load_aux_cache, save_aux_cache): New functions.
	* sysdeps/generic/ldconfig.h (_PATH_LDCONFIG_AUX_CACHE): Define.
	(init_aux_cache, search_aux_cache, add_to_aux_cache,
	load_aux_cache, save_aux_cache, implicit_soname): New prototypes.
	(process_file): Adjust prototype.
2007-08-12 20:09:16 +00:00
Ulrich Drepper 4503061fdc * elf/dl-misc.c (_dl_sysdep_read_whole_file): We really don't need
an atime update for the files we read.
2007-08-11 16:58:49 +00:00
Roland McGrath 773e305efc * include/stdlib.h: Add libc_hidden_proto for strto*, __strto*_l.
Remove __strto*_l inlines.
	* include/wchar.h: Add libc_hidden_proto for wcsto*, __wcsto*_l.
	* stdlib/strtod.c: Add libc_hidden_def.
	* stdlib/strtod_l.c: Likewise.
	* stdlib/strtold.c [__LONG_DOUBLE_MATH_OPTIONAL]: Add libc_hidden_proto
	for __new_strtold and __new_wcstold.
	* sysdeps/ieee754/ldbl-128ibm/strtold_l.c: Add libc_hidden_proto for
	__STRTOF, STRTOF.
	* stdlib/strtol.c: Add libc_hidden_def.
	* stdlib/strtol_l.c: Likewise.
	* sysdeps/wordsize-64/strtol.c: Add libc_hidden_ver for strtoll and
	strtoq.

	* scripts/data/localplt-powerpc-linux-gnu.data: New file.

	* scripts/data/localplt-x86_64-linux-gnu.data: File renamed to ...
	* scripts/data/localplt-generic.data: ... here.
	* elf/Makefile (check-data): Get generic file if no other.
	($(objpfx)check-localplt.out): Make target unconditional.
2007-08-07 05:36:32 +00:00
Ulrich Drepper ce31a3b1c5 * intl/dcigettext.c (_nl_find_msg): Free encoding if __gconv_open
failed.
	* intl/finddomain.c (_nl_find_domain): Free normalized_codeset
	on failure.

	* elf/dl-load.c (decompose_rpath): Free copy if result couldn't be
	allocated.

2007-08-03  Jakub Jelinek  <jakub@redhat.com>
2007-08-03 15:50:30 +00:00
Roland McGrath 2e2efe652a * elf/ldconfig.c: Allow GPLv2 or any later version.
* elf/readlib.c: Likewise.
	* elf/chroot_canon.c: Likewise.
	* elf/cache.c: Likewise.
	* nscd/mem.c: Likewise.
	* nscd/getpwuid_r.c: Likewise.
	* nscd/grpcache.c: Likewise.
	* nscd/aicache.c: Likewise.
	* nscd/getsrvbynm_r.c: Likewise.
	* nscd/nscd.c: Likewise.
	* nscd/servicescache.c: Likewise.
	* nscd/getsrvbypt_r.c: Likewise.
	* nscd/initgrcache.c: Likewise.
	* nscd/gethstbyad_r.c: Likewise.
	* nscd/gethstbynm2_r.c: Likewise.
	* nscd/getgrnam_r.c: Likewise.
	* nscd/nscd_setup_thread.c: Likewise.
	* nscd/getpwnam_r.c: Likewise.
	* nscd/gai.c: Likewise.
	* nscd/connections.c: Likewise.
	* nscd/dbg_log.c: Likewise.
	* nscd/cache.c: Likewise.
	* nscd/hstcache.c: Likewise.
	* nscd/nscd_conf.c: Likewise.
	* nscd/getgrgid_r.c: Likewise.
	* nscd/pwdcache.c: Likewise.
	* catgets/gencat.c: Likewise.
	* locale/programs/linereader.h: Likewise.
	* locale/programs/locarchive.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/locfile-kw.h: Likewise.
	* locale/programs/ld-address.c: Likewise.
	* locale/programs/xmalloc.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* locale/programs/simple-hash.c: Likewise.
	* locale/programs/xstrdup.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/locfile-kw.gperf: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* locale/programs/charmap-kw.gperf: Likewise.
	* locale/programs/charmap.h: Likewise.
	* locale/programs/charmap-kw.h: Likewise.
	* locale/programs/config.h: Likewise.
	* locale/programs/locfile.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-messages.c: Likewise.
	* locale/programs/repertoire.h: Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/ld-name.c: Likewise.
	* locale/programs/linereader.c: Likewise.
	* locale/programs/locfile.h: Likewise.
	* locale/programs/3level.h: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-measurement.c: Likewise.
	* locale/programs/charmap-dir.c: Likewise.
	* locale/programs/ld-identification.c: Likewise.
	* locale/programs/localedef.h: Likewise.
	* locale/programs/charmap-dir.h: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/simple-hash.h: Likewise.
	* locale/programs/ld-telephone.c: Likewise.
	* locale/programs/locale-spec.c: Likewise.
	* locale/programs/locfile-token.h: Likewise.
	* posix/getconf.c: Likewise.
	* iconv/dummy-repertoire.c: Likewise.
	* iconv/iconv_charmap.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise.
2007-07-16 00:56:07 +00:00
Ulrich Drepper 1c298d0887 [BZ #4775, BZ #4776]
2007-07-12  Jakub Jelinek  <jakub@redhat.com>
	[BZ #4775]
	* math/tgmath.h (__tgmath_real_type_sub): Formatting.
	(__tgmath_real_type): Fix if expr is const int or other const
	qualified integral type.
	(__TGMATH_UNARY_REAL_ONLY): Rewritten to avoid using statement
	expressions and handle const qualified arguments.
	(__TGMATH_BINARY_FIRST_REAL_ONLY, __TGMATH_UNARY_REAL_IMAG,
	__TGMATH_UNARY_REAL_IMAG_RET_REAL): Likewise.
	(__TGMATH_UNARY_REAL_RET_ONLY): Rewritten to avoid using
	statement expressions.
	(__TGMATH_BINARY_REAL_ONLY, __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY,
	__TGMATH_TERNARY_REAL_ONLY, __TGMATH_BINARY_REAL_IMAG): Likewise.
	(__TGMATH_UNARY_IMAG): Define.
	(conj, cproj): Use __TGMATH_UNARY_IMAG macro.
	* math/Makefile (tests): Add test-tgmath2.
	(CFLAGS-test-tgmath2.c): Add.
	* math/test-tgmath.c (fy, dy, ly, fz, dz, lz, count_cdouble,
	count_cfloat, count_cldouble): New variables.
	(NCCALLS): Define.
	(main): Check number of complex calls as well.
	(F(compile_test)): Add complex tests and tests with const qualified
	arguments.
	(y, z, ccount): Define.
	(F(cacos), F(casin), F(catan), F(ccos), F(csin), F(ctan), F(cacosh),
	F(casinh), F(catanh), F(ccosh), F(csinh), F(ctanh), F(cexp), F(clog),
	F(csqrt), F(cpow), F(cabs), F(carg), F(creal), F(cimag), F(conj),
	F(cproj)): New functions.
	* math/test-tgmath2.c: New test.

2007-07-11  Jakub Jelinek  <jakub@redhat.com>

	[BZ #4776]
	* elf/dl-load.c (_dl_rtld_di_serinfo): Output / in LD_LIBRARY_PATH,
	RPATH etc. as "/" rather than "", don't segfault on empty paths,
	instead output ".".
	* dlfcn/Makefile (distribute): Add glreflib3.c.
	(module-names): Add glreflib3.
	($(objpfx)tst-dlinfo.out): Depend on glreflib3.so rather than
	glreflib1.so.
	(LDFLAGS_glreflib3.so): New.
	* dlfcn/tst-dlinfo.c (do_test): Load glreflib3.so instead of
	glreflib1.so.
	* dlfcn/glreflib3.c: New file.

	* intl/finddomain.c (_nl_find_domain): If _nl_explode_name
	returned -1, return NULL.
	* intl/explodename.c (_nl_explode_name): Return -1 if
	_nl_normalize_codeset failed.
2007-07-12 18:17:11 +00:00
Roland McGrath 57b5b34cca 2007-07-09 Roland McGrath <roland@redhat.com>
* elf/elf.h (NT_GNU_ABI_TAG): New macro.
	(ELF_NOTE_ABI): Use it.
	(NT_GNU_HWCAP, NT_GNU_BUILD_ID): New macros.
2007-07-10 00:39:26 +00:00
Ulrich Drepper 8e46c99fd5 Fix typo. 2007-07-04 21:17:34 +00:00
Ulrich Drepper 1311e86e43 * elf/dl-sysdep.c (_dl_important_hwcaps): Add integer overflow check.
* elf/dl-minimal.c (__libc_memalign): Likewise.  Handle malloc (0).
	Return NULL if mmap failed instead of asserting it does not.
	(calloc): Check for integer overflow.

	* elf/dl-minimal.c (__strtoul_internal): Fix parsing of numbers bigger
	than LONG_MAX / 10.
2007-07-04 18:06:39 +00:00
Ulrich Drepper 0e508a6e4a * elf/dl-load.c (open_verify): Find .note.ABI-tag notes even
in PT_NOTE segments with multiple notes.
	* elf/readelflib.c (process_elf_file): Likewise.
2007-06-30 17:01:43 +00:00
Ulrich Drepper 2f6773b574 (open_verify): Find .note.ABI-tag notes even in PT_NOTE segments with multiple notes. 2007-06-30 17:01:07 +00:00
Ulrich Drepper e4eb675d0c * elf/dl-close.c (free_mem): Free _dl_scope_free_list.
2007-06-13  Jakub Jelinek  <jakub@redhat.com>

	* include/link.h: Don't include rtld-lowlevel.h.
	(struct link_map): Remove l_scope_lock.
	* sysdeps/generic/ldsodefs.h: Don't include rtld-lowlevel.h.
	(_dl_scope_free_list): New field (variable) in _rtld_global.
	(DL_LOOKUP_SCOPE_LOCK): Remove.
	(_dl_scope_free): New prototype.
	* elf/dl-runtime.c (_dl_fixup): Don't use __rtld_mrlock_*lock.
	Don't pass DL_LOOKUP_SCOPE_LOCK to _dl_lookup_symbol_x.
	(_dl_profile_fixup): Likewise.
	* elf/dl-sym.c (do_sym): Likewise.  Use wrapped _dl_lookup_symbol_x
	whenever !RTLD_SINGLE_THREAD_P, use THREAD_GSCOPE_SET_FLAG and
	THREAD_GSCOPE_RESET_FLAG around it.
	* elf/dl-close.c (_dl_close_worker): Don't use
	__rtld_mrlock_{change,done}.  Call _dl_scope_free on the old
	scope.  Make sure THREAD_GSCOPE_WAIT () happens if any old
	scopes were queued or if l_scope_mem has been abandoned.
	* elf/dl-open.c (_dl_scope_free): New function.
	(dl_open_worker): Use it.  Don't use __rtld_mrlock_{change,done}.
	* elf/dl-support.c (_dl_scope_free_list): New variable.
	* elf/dl-lookup.c (add_dependency): Remove flags argument.
	Remove DL_LOOKUP_SCOPE_LOCK handling.
	(_dl_lookup_symbol_x): Adjust caller.  Remove DL_LOOKUP_SCOPE_LOCK
	handling.
	* elf/dl-object.c (_dl_new_object): Don't use
	__rtld_mrlock_initialize.

2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2007-06-20 03:19:13 +00:00
Ulrich Drepper 9be09e060f * sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements
to fill in holes
	(rtld_global_ro): Likewise.

2007-06-18  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous.
	Move PT_LOAD checking to...
	(_dl_addr_inside_object): ... here, new function.
	* elf/dl-sym.c (do_sym): If not l_contiguous,
	call _dl_addr_inside_object.
	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.
	* dlfcn/dlinfo.c (dlinfo_doit): Likewise.
	* elf/dl-open.c (dl_open_worker): Likewise.
	(_dl_addr_inside_object): New function if IS_IN_rtld.
	* elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no
	holes are present or are PROT_NONE protected.
	* include/link.h (struct link_map): Add l_contiguous field.
	* sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype.
2007-06-19 22:59:48 +00:00
Ulrich Drepper 3abee0b7f1 * elf/rtld.c (dl_main): Don't call init_tls more than once. 2007-06-18 20:50:49 +00:00
Ulrich Drepper 90cd2413df * elf/do-lookup.h (do_lookup_x): Read r_nlist before r_list and
make sure gcc doesn't mess around with this.
2007-06-09 19:45:57 +00:00
Ulrich Drepper 3c45708967 * elf/dl-lookup.c (_dl_lookup_symbol_x): Remove use of r_nlist. 2007-06-09 02:19:12 +00:00
Ulrich Drepper e8b6b64d3c * elf/dl-close.c (_dl_close_worker): Remove all to be removed
libraries from the global scope at once and call THREAD_GSCOPE_WAIT
	at most once per _dl_close_worker.
2007-06-09 02:13:06 +00:00
Ulrich Drepper df94b6412e * elf/dl-close.c (_dl_close_worker): When removing object from
global scope, wait for all lookups to finish afterwards.
	* elf/dl-open.c (add_to_global): When global scope array must
	grow, allocate a new one and free old array only after all
	lookups finish.
	* elf/dl-runtime.c (_dl_fixup): Protect using global scope.
	(_dl_lookup_symbol_x): Likewise.
	* elf/dl-support.c: Define _dl_wait_lookup_done.
	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add
	_dl_wait_lookup_done.
2007-05-19 07:08:23 +00:00
Ulrich Drepper 9b0d1c0236 (add_to_global): One more small cleanup patch. 2007-05-11 21:34:32 +00:00
Ulrich Drepper 2e81d44986 * elf/dl-close.c (_dl_close_worker): Help gcc to optimize by
adding new variables.

	optimize.  Completely extend global scope array before making the
2007-05-11 18:46:50 +00:00
Ulrich Drepper d65ef3dda3 * elf/dl-open.c (add_to_global): Introduce variable ns to help gcc
optimize.  Complerely extend global scope array before making the
	new entries visible.
2007-05-11 18:27:20 +00:00
Ulrich Drepper ffecd39b9c [BZ #4131]
2007-05-06  Ulrich Drepper  <drepper@redhat.com>
	[BZ #4131]
	* elf/dl-addr.c (_dl_addr): Compare address with actual segment
	boundaries to work around systems with overlapping binary loading.
	Based on a patch by Suzuki <suzuki@in.ibm.com>.
2007-05-06 21:01:32 +00:00
Roland McGrath 70f1d28c11 2007-04-22 Roland McGrath <roland@redhat.com>
* elf/elf.h (NT_PRXFPREG): New macro.
2007-04-22 10:36:16 +00:00
Jakub Jelinek 30a3aa7530 [BZ #4344]
* elf/ldconfig.c (search_dir): Fix 2 off-by-2 errors. 
Reported by David Anderson <davea42@earthlink.net>.
2007-04-13  Jakub Jelinek  <jakub@redhat.com>

	[BZ #4344]
	* elf/ldconfig.c (search_dir): Fix 2 off-by-2 errors.
	Reported by David Anderson <davea42@earthlink.net>.
2007-04-13 19:53:20 +00:00
Ulrich Drepper 965cba048c * elf/dl-open.c (dl_open_worker): Declare l in 2 different
smaller scopes.
	* elf/dl-dst.h (DL_DST_REQ_STATIC): Add l as macro argument.
	(DL_DST_REQUIRED): Adjust user.

	* include/dlfcn.h (struct link_map): New forward decl.

	* inet/getnameinfo.c: Include stddef.h.
	(getnameinfo): Use offsetof.

	* time/tst-mktime2.c (do_test): Don't rely on signed wrap.

	* stdio-common/vfprintf.c (_itoa): Undef before redefining.

	* string/strerror_l.c: Include stdlib.h.
2007-03-17 17:09:13 +00:00
Richard Henderson 47dbe62b55 * elf/dl-support.c (_dl_aux_init): Honor DL_PLATFORM_AUXV.
* sysdeps/unix/sysv/linux/alpha/dl-auxv.h: New file. 
* sysdeps/unix/sysv/linux/alpha/dl-support.c: New file. 
* sysdeps/unix/sysv/linux/alpha/dl-sysdep.c (__libc_alpha_cache_shape): 
Move to dl-auxv.h; initialize instead of extern weak. 
(DL_PLATFORM_AUXV): Move to dl-auxv.h; don't test for undef 
weak symbol. 
* sysdeps/unix/sysv/linux/alpha/sysconf.c (__libc_alpha_cache_shape): 
Extern instead of initialized.
        * elf/dl-support.c (_dl_aux_init): Honor DL_PLATFORM_AUXV.
	* sysdeps/unix/sysv/linux/alpha/dl-auxv.h: New file.
	* sysdeps/unix/sysv/linux/alpha/dl-support.c: New file.
	* sysdeps/unix/sysv/linux/alpha/dl-sysdep.c (__libc_alpha_cache_shape):
	Move to dl-auxv.h; initialize instead of extern weak.
	(DL_PLATFORM_AUXV): Move to dl-auxv.h; don't test for undef
	weak symbol.
	* sysdeps/unix/sysv/linux/alpha/sysconf.c (__libc_alpha_cache_shape):
	Extern instead of initialized.

2007-03-13  Richard Henderson  <rth@redhat.com>
2007-03-13 21:25:16 +00:00
Ulrich Drepper 2f978feb67 * elf/rtld.c (RESOLVE_MAP): Always return bootstrap_map reference.
* elf/Makefile ($(objpfx)ld.so): Check that ld.so has no undefined
	references.
2007-02-12 15:17:30 +00:00
Ulrich Drepper 8aaf53ee7e * elf/dl-minimal.c: Undefine _itoa first. 2007-01-25 17:10:56 +00:00
Ulrich Drepper 4e35ef2c71 * sysdeps/generic/ldsodefs.h: Define DL_LOOKUP_SCOPE_LOCK.
* elf/dl-lookup.c (add_dependency): If scope map is locked, unlock
	it before getting dl_load_lock and then relock.
	(_dl_lookup_symbol_x): Pass flags to add_dependency.
	When rerunning _dl_lookup_symbol_x, compute symbol_scope again in
	case we unlocked the scope.
	* elf/dl-runtime.c (_dl_fixup): Pass DL_LOOKUP_SCOPE_LOCK to
	_dl_lookup_symbol_x in case we locked the scope.
	(_dl_profile_fixup): Likewise.
	* elf/dl-sym.c (do_sym): In flags passed to call_dl_lookup, also
	set DL_LOOKUP_SCOPE_LOCK.
2007-01-15 20:48:56 +00:00
Ulrich Drepper 11bf311edc [BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ #3483, BZ #3493, BZ #3514, BZ #3515, BZ #3664, BZ #3673, BZ #3674]
2007-01-11  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/i386/soft-fp/sfp-machine.h: Remove.
	* sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise.
2007-01-10  Ulrich Drepper  <drepper@redhat.com>
	* io/fts.c: Make sure fts_cur is always valid after return from
	fts_read.
	Patch by Miloslav Trmac <mitr@redhat.com>.
2006-10-27  Richard Sandiford  <richard@codesourcery.com>
	* elf/elf.h (R_MIPS_GLOB_DAT): Define.
	(R_MIPS_NUM): Bump by 1.
2007-01-03  Jakub Jelinek  <jakub@redhat.com>
	* posix/execvp.c: Include alloca.h.
	(allocate_scripts_argv): Renamed to...
	(scripts_argv): ... this.  Don't allocate buffer here nor count
	arguments.
	(execvp): Use alloca if possible.
	* posix/Makefile: Add rules to build and run tst-vfork3 test.
	* posix/tst-vfork3.c: New test.
	* stdlib/Makefile (tst-strtod3-ENV): Define.
2007-01-02  Ulrich Drepper  <drepper@redhat.com>
	* 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.
2006-12-24  Ulrich Drepper  <drepper@redhat.com>
	* malloc/malloc.c (sYSMALLOc): Remove some unnecessary alignment
	attempts.
2006-12-23  Ulrich Drepper  <drepper@redhat.com>
	* posix/wordexp.c: Remove some unnecessary tests.
2006-12-20  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>

	* sysdeps/unix/sysv/linux/sh/bits/shm.h: New file.

	* nss/getXXbyYY_r.c: Include atomic.h.
	(INTERNAL (REENTRANT_NAME)): Write startp after start_fct,
	add atomic_write_barrier () in between.

2006-11-28  Jakub Jelinek  <jakub@redhat.com>
	* elf/dl-support.c: Include dl-procinfo.h.
	* sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4,
	PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS,
	PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X):
	Define.
	(_dl_string_platform): Use PPC_PLATFORM_* macros instead of
	hardcoded constants.
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use
	PPC_PLATFORM_* macros for array designators.
2006-11-11  Steven Munroe  <sjmunroe@us.ibm.com>
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap
	names to the beginning.
	(_dl_powerpc_platforms): Add "power6x".
	* sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease.
	(HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP.
	(_DL_PLATFORMS_COUNT): Increase.
	(_dl_string_platform): Handle power6x case.
	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP,
	PPC_FEATURE_POWER6_EXT): Define.
	(PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment.
	[-2^31 .. 2^31) range.
	* sysdeps/unix/sysv/linux/bits/statvfs.h: Define ST_RELATIME.
	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
	Handle relatime mount option.

2006-12-13  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Include
	kernel-features.h.

2006-12-11  Ulrich Drepper  <drepper@redhat.com>

	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand
	separators also if no non-zero digits found.
	* stdlib/Makefile (tests): Add tst-strtod3.
	[BZ #3664]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize
	empty parsed strings.
	* stdlib/Makefile (tests): Add tst-strtod2.
	* stdlib/tst-strtod2.c: New file.

	[BZ #3673]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit
	computation.
	* stdlib/Makefile (tests): Add tst-atof2.
	* stdlib/tst-atof2.c: New file.

	[BZ #3674]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value
	correctly if removing trailing zero of hex-float.
	* stdlib/Makefile (tests): Add tst-atof1.
	* stdlib/tst-atof1.c: New file.

	* misc/mntent_r.c (__hasmntopt): Check p[optlen] even when p == rest.
	Start searching for next comma at p rather than rest.
	* misc/Makefile (tests): Add tst-mntent2.
	* misc/tst-mntent2.c: New test.

2006-12-08  Ulrich Drepper  <drepper@redhat.com>
	* malloc/memusage.c: Handle realloc with new size of zero and
	non-NULL pointer correctly.
	(me): Really write first record twice.
	(struct entry): Make format bi-arch safe.
	(dest): Write out more realloc statistics.
	* malloc/memusagestat.c (struct entry): Make format bi-arch safe.
2006-12-05  Jakub Jelinek  <jakub@redhat.com>
	* nis/nis_subr.c (nis_getnames): Revert last change.
2006-12-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
	* sysdeps/unix/sysv/linux/sh/sys/io.h: Removed.
2006-11-30  H.J. Lu  <hongjiu.lu@intel.com>
	* sysdeps/i386/i686/memcmp.S: Use jump table as the base of
	jump table entries.

2006-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost
	`clone' function to ensure proper unwinding stop of gdb.
	* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.

2006-12-01  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd.init: Remove obsolete and commented-out -S option
	handling.

2006-11-23  Jakub Jelinek  <jakub@redhat.com>

	[BZ #3514]
	* manual/string.texi (strncmp): Fix pastos from wcscmp description.

	[BZ #3515]
	* manual/string.texi (strtok): Remove duplicate paragraph.

2006-12-01  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Fix compatibility with
	libgcc not supporting `rflags' unwinding (register # >= 17).

2006-11-30  Jakub Jelinek  <jakub@redhat.com>

	* sunrpc/svc_run.c (svc_run): Set my_pollfd to new_pollfd if realloc
	succeeded.

2006-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
	    Jakub Jelinek  <jakub@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sigaction.c (restore_rt): Add correct
	unwind information.
	* sysdeps/unix/sysv/linux/x86_64/Makefile: Provide symbols for
	'restore_rt' even in the 'signal' directory.
	* sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: Extend the regs list.
	malloc crashed.  Don't allocate memory unnecessarily in each
	loop.
2006-10-21  Jakub Jelinek  <jakub@redhat.com>
	* resolv/mapv4v6addr.h (map_v4v6_address): Fix last change.
2006-11-20  Ulrich Drepper  <drepper@redhat.com>
	* resolv/mapv4v6addr.h (map_v4v6_address): Optimize a bit.
2006-11-18  Bruno Haible  <bruno@clisp.org>
	* sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Invoke
	__sysconf only after having tried to call getgroups32.
2006-11-19  Ulrich Drepper  <drepper@redhat.com>
	* nss/nss_files/files-hosts.c (LINE_PARSER): Support IPv6-style
	addresses for IPv4 queries if they can be mapped.
2006-11-16  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/x86_64/fpu/s_copysignf.S (__copysignf): Switch to .text.
	* sysdeps/x86_64/fpu/s_copysign.S (__copysign): Likewise.
	(signmask): Add .size directive.
	(othermask): Add .type directive.
2006-11-14  Ulrich Drepper  <drepper@redhat.com>
	* po/nl.po: Update from translation team.
	* timezone/zdump.c: Redo fix for BZ #3137.
2006-11-14  Jakub Jelinek  <jakub@redhat.com>
	* nss/nss_files/files-alias.c (get_next_alias): Set line back
	to first_unused after parsing :include: file.
	* timezone/africa: Update from tzdata2006o.
	* timezone/antarctica: Likewise.
	* timezone/asia: Likewise.
	* timezone/australasia: Likewise.
	* timezone/backward: Likewise.
	* timezone/europe: Likewise.
	* timezone/iso3166.tab: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/zone.tab: Likewise.

	* time/tzfile.c (__tzfile_read): Extend to handle new file format
	on machines with 64-bit time_t.

	* timezone/checktab.awk: Update from tzcode2006o.
	* timezone/ialloc.c: Likewise.
	* timezone/private.h: Likewise.
	* timezone/scheck.c: Likewise.
	* timezone/tzfile.h: Likewise.
	* timezone/tzselect.ksh: Likewise.
	* timezone/zdump.c: Likewise.
	* timezone/zic.c: Likewise.

	[BZ #3483]
	* elf/ldconfig.c (main): Call setlocale and textdomain.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.

	[BZ #3480]
	* manual/argp.texi: Fix typos.
	* manual/charset.texi: Likewise.
	* manual/errno.texi: Likewise.
	* manual/filesys.texi: Likewise.
	* manual/lang.texi: Likewise.
	* manual/maint.texi: Likewise.
	* manual/memory.texi: Likewise.
	* manual/message.texi: Likewise.
	* manual/resource.texi: Likewise.
	* manual/search.texi: Likewise.
	* manual/signal.texi: Likewise.
	* manual/startup.texi: Likewise.
	* manual/stdio.texi: Likewise.
	* manual/sysinfo.texi: Likewise.
	* manual/syslog.texi: Likewise.
	* manual/time.texi: Likewise.
	Patch by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.

	[BZ #3465]
	* sunrpc/clnt_raw.c: Minimal message improvements.
	* sunrpc/pm_getmaps.c: Likewise.
	* nis/nss_nisplus/nisplus-publickey.c: Likewise.
	* nis/nis_print_group_entry.c: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* elf/dl-deps.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* libio/vswprintf.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/rpc_main.c: Likewise.
	* nscd/cache.c: Likewise.
	* locale/programs/repertoire.c: Unify output messages.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* nscd/selinux.c: Likewise.
	* elf/cache.c: Likewise.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.

2006-11-10  Jakub Jelinek  <jakub@redhat.com>

	* string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization
	if N is one bigger than return value.
	* string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1
	and l1 last arguments, if buf is defined, verify the return value
	equals to strlen (buf) and verify no byte beyond passed length
	is modified.

2006-11-10  Ulrich Drepper  <drepper@redhat.com>

	* po/sv.po: Update from translation team.

	* sysdeps/gnu/siglist.c (__old_sys_siglist, __old_sys_sigabbrev):
	Use __new_sys_siglist instead of _sys_siglist_internal as
	second macro argument.
	(_old_sys_siglist): Use declare_symbol_alias macro instead of
	strong_alias.
2006-11-09  Ulrich Drepper  <drepper@redhat.com>

	[BZ #3493]
	* posix/unistd.h (sysconf): Remove const attribute.

	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix test for
	temporary or deprecated addresses.
	Patch by Sridhar Samudrala <sri@us.ibm.com>.

	* string/Makefile (tests): Add tst-strxfrm2.
	* string/tst-strxfrm2.c: New file.

2006-10-09  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0
	rather than r->r_brk.
	* string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal
	optimization even if needed > n.

2006-11-07  Jakub Jelinek  <jakub@redhat.com>

	* include/libc-symbols.h (declare_symbol): Rename to...
	(declare_symbol_alias): ... this.  Add ORIGINAL argument, imply
	strong_alias (ORIGINAL, SYMBOL) in asm to make sure it preceedes
	.size directive.
	* sysdeps/gnu/errlist-compat.awk: Adjust for declare_symbol_alias
	changes.
	* sysdeps/gnu/siglist.c: Likewise.

2006-11-03  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/fpu/bits/mathinline.h
	[__LIBC_INTERNAL_MATH_INLINES]: Moved to ...
	* sysdeps/powerpc/fpu/math_private.h: ...here.  New file.

2006-11-05  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word):
	Update handling of cache descriptor 0x49 for new models.
	* sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_check_word):
	Likewise.

2006-11-02  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Work around ld --help change and avoid -z relro
	test completely if the architecture doesn't care about security.

2006-11-01  Ulrich Drepper  <drepper@redhat.com>

	* po/sv.po: Update from translation team.

2006-10-31  Ulrich Drepper  <drepper@redhat.com>

	* stdlib/atexit.c (atexit): Don't mark as hidden when used to
	generate compatibility version.

2006-10-29  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Relax -z relro requirement a bit.

	* po/sv.po: Update from translation team.

2006-10-29  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-sym.c (do_sym): Use RTLD_SINGLE_THREAD_P.
	* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Likewise.
	* elf/dl-close.c (_dl_close_worker): Likewise.
	* elf/dl-open.c (_dl_open_worker): Likewise.
	* sysdeps/generic/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define.

	* configure.in: Require assembler support for visibility, compiler
	support for visibility and aliases, linker support for various -z
	options.
	* Makeconfig: Remove conditional code which now is unnecessary.
	* config.h.in: Likewise.
	* config.make.in: Likewise.
	* dlfcn/Makefile: Likewise.
	* elf/Makefile: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/libc-symbols.h: Likewise.
	* include/stdio.h: Likewise.
	* io/Makefile: Likewise.
	* io/fstat.c: Likewise.
	* io/fstat64.c: Likewise.
	* io/fstatat.c: Likewise.
	* io/fstatat64.c: Likewise.
	* io/lstat.c: Likewise.
	* io/lstat64.c: Likewise.
	* io/mknod.c: Likewise.
	* io/mknodat.c: Likewise.
	* io/stat.c: Likewise.
	* io/stat64.c: Likewise.
	* libio/stdio.c: Likewise.
	* nscd/Makefile: Likewise.
	* stdlib/Makefile: Likewise.
	* stdlib/atexit.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/i386/sysdep.h: Likewise.
	* sysdeps/i386/i686/memcmp.S: Likewise.
	* sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.

	* Makerules: USE_TLS support is now default.
	* tls.make.c: Likewise.
	* csu/Versions: Likewise.
	* csu/libc-start.c: Likewise.
	* csu/libc-tls.c: Likewise.
	* csu/version.c: Likewise.
	* dlfcn/dlinfo.c: Likewise.
	* elf/dl-addr.c: Likewise.
	* elf/dl-cache.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-iteratephdr.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-reloc.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-sysdep.c: Likewise.
	* elf/dl-tls.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/tst-tls-dlinfo.c: Likewise.
	* elf/tst-tls1.c: Likewise.
	* elf/tst-tls10.h: Likewise.
	* elf/tst-tls14.c: Likewise.
	* elf/tst-tls2.c: Likewise.
	* elf/tst-tls3.c: Likewise.
	* elf/tst-tls4.c: Likewise.
	* elf/tst-tls5.c: Likewise.
	* elf/tst-tls6.c: Likewise.
	* elf/tst-tls7.c: Likewise.
	* elf/tst-tls8.c: Likewise.
	* elf/tst-tls9.c: Likewise.
	* elf/tst-tlsmod1.c: Likewise.
	* elf/tst-tlsmod13.c: Likewise.
	* elf/tst-tlsmod13a.c: Likewise.
	* elf/tst-tlsmod14a.c: Likewise.
	* elf/tst-tlsmod2.c: Likewise.
	* elf/tst-tlsmod3.c: Likewise.
	* elf/tst-tlsmod4.c: Likewise.
	* elf/tst-tlsmod5.c: Likewise.
	* elf/tst-tlsmod6.c: Likewise.
	* include/errno.h: Likewise.
	* include/link.h: Likewise.
	* include/tls.h: Likewise.
	* locale/global-locale.c: Likewise.
	* locale/localeinfo.h: Likewise.
	* malloc/arena.c: Likewise.
	* malloc/hooks.c: Likewise.
	* malloc/malloc.c: Likewise.
	* resolv/Versions: Likewise.
	* sysdeps/alpha/dl-machine.h: Likewise.
	* sysdeps/alpha/libc-tls.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/generic/tls.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/ia64/dl-machine.h: Likewise.
	* sysdeps/ia64/libc-tls.c: Likewise.
	* sysdeps/mach/hurd/fork.c: Likewise.
	* sysdeps/mach/hurd/i386/tls.h: Likewise.
	* sysdeps/powerpc/powerpc32/dl-machine.c: Likwise.
	* sysdeps/powerpc/powerpc32/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
	* sysdeps/s390/libc-tls.c: Likewise.
	* sysdeps/s390/s390-32/dl-machine.h: Likewise.
	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
	* sysdeps/sh/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
	* sysdeps/x86_64/dl-machine.h: Likewise.

	[BZ #3426]
	* stdlib/stdlib.h: Adjust comment for canonicalize_file_name to
	reality.

2006-10-27  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-lookup.c (_dl_debug_bindings): Remove unused symbol_scope
	argument.
	(_dl_lookup_symbol_x): Adjust caller.

	* sysdeps/generic/ldsodefs.h (struct link_namespaces): Remove
	_ns_global_scope.
	* elf/rtld.c (dl_main): Don't initialize _ns_global_scope.

	* elf/dl-libc.c: Revert l_scope name changes.
	* elf/dl-load.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/dl-close.c (_dl_close): Likewise.
	* elf/dl-open.c (dl_open_worker): Likewise.  If not SINGLE_THREAD_P,
	always use __rtld_mrlock_{change,done}.  Always free old scope list
	here if not l_scope_mem.
	* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Revert l_scope name
	change.  Never free scope list here.  Just __rtld_mrlock_lock before
	the lookup and __rtld_mrlock_unlock it after the lookup.
	* elf/dl-sym.c: Likewise.
	* include/link.h (struct r_scoperec): Remove.
	(struct link_map): Replace l_scoperec with l_scope, l_scoperec_mem
	with l_scope_mem and l_scoperec_lock with l_scope_lock.

2006-10-25  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/gnu/netinet/tcp.h: Define TCP_CONGESTION.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Disable building profile libraries by default.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to
	_dl_lookup_symbol_x code.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-runtime.c: Include sysdep-cancel.h.
	(_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and
	scoperec->nusers only if !SINGLE_THREAD_P.  Use atomic_*
	instead of catomic_* macros.
	* elf/dl-sym.c: Include sysdep-cancel.h.
	(do_sym): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.
	* elf/dl-close.c: Include sysdep-cancel.h.
	(_dl_close): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.
	* elf/dl-open.c: Include sysdep-cancel.h.
	(dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	[BZ #3313]
	* malloc/malloc.c (malloc_consolidate): Set maxfb to address of last
	fastbin rather than end of fastbin array.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/i486/bits/atomic.h (catomic_decrement): Use correct
	body macro.
	* sysdeps/x86_64/bits/atomic.h
	(__arch_c_compare_and_exchange_val_64_acq): Add missing casts.
	(catomic_decrement): Use correct body macro.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	* include/atomic.h: Add a unique prefix to all local variables
	in macros.
	* csu/tst-atomic.c (do_test): Test also catomic_* macros.

2006-10-14  Ulrich Drepper  <drepper@redhat.com>

	* resolv/arpa/nameser.h: Document that ns_t_a6 is deprecated.

	[BZ #3313]
	* malloc/malloc.c (malloc_consolidate): Don't use get_fast_max to
	determine highest fast bin to consolidate, always look into all of
	them.
	(do_check_malloc_state): Only require for empty bins for large
	sizes in main arena.

	* libio/stdio.h: Add more __wur attributes.

2006-11-12  Andreas Jaeger  <aj@suse.de>

	[BZ #2510]
	* manual/search.texi (Hash Search Function): Clarify.
	(Array Search Function): Clarify.

2006-11-12  Joseph Myers  <joseph@codesourcery.com>

	[BZ #2830]
	* math/atest-exp.c (main): Cast hex value to mp_limb_t before
	shifting.
	* math/atest-exp2.c (read_mpn_hex): Likewise.
	* math/atest-sincos.c (main): Likewise.

	* sysdeps/unix/sysv/linux/syscalls.list: Add epoll_pwait.
	* sysdeps/unix/sysv/linux/sys/epoll.h: Declare epoll_pwait.
	* sysdeps/unix/sysv/linux/Versions (libc): Add epoll_pwait for
	version GLIBC_2.6.
	* Versions.def: Add GLIBC_2.6 for libc.

	* sysdeps/i386/i486/bits/atomic.h: Add catomic_* support.

2006-10-11  Jakub Jelinek  <jakub@redhat.com>

	* malloc/malloc.c (_int_malloc): Remove unused any_larger variable.

	* nis/nis_defaults.c (__nis_default_access): Don't call getenv twice.

	* nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv.
	* sysdeps/generic/unsecvars.h: Add NIS_PATH.

2006-10-11  Ulrich Drepper  <drepper@redhat.com>

	* include/atomic.c: Define catomic_* operations.
	* sysdeps/x86_64/bits/atomic.h: Likewise.  Fix a few minor problems.
	* stdlib/cxa_finalize.c: Use catomic_* operations instead of atomic_*.
	* malloc/memusage.c: Likewise.
	* gmon/mcount.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-profile.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-runtime.c: Likewise.
	* elf/dl-fptr.c: Likewise.
	* resolv/res_libc.c: Likewise.

2006-10-10  Roland McGrath  <roland@frob.com>
	* sysdeps/mach/hurd/utimes.c: Use a union to avoid an improper cast.
	* sysdeps/mach/hurd/futimes.c: Likewise.
	* sysdeps/mach/hurd/lutimes.c: Likewise.

2006-10-09  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	Implement reference counting of scope records.
	* elf/dl-close.c (_dl_close): Remove all scopes from removed objects
	from the list in objects which remain.  Always allocate new scope
	record.
	* elf/dl-open.c (dl_open_worker): When growing array for scopes,
	don't resize, allocate a new one.
	* elf/dl-runtime.c: Update reference counters before using a scope
	array.
	* elf/dl-sym.c: Likewise.
	* elf/dl-libc.c: Adjust for l_scope name change.
	* elf/dl-load.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/link.h: Include <rtld-lowlevel.h>.  Define struct
	r_scoperec.  Replace r_scope with pointer to r_scoperec structure.
	Add l_scoperec_lock.
	* sysdeps/generic/ldsodefs.h: Include <rtld-lowlevel.h>.
	* sysdeps/generic/rtld-lowlevel.h: New file.

	* include/atomic.h: Rename atomic_and to atomic_and_val and
	atomic_or to atomic_or_val.  Define new macros atomic_and and
	atomic_or which do not return values.
	* sysdeps/x86_64/bits/atomic.h: Define atomic_and and atomic_or.
	Various cleanups.
	* sysdeps/i386/i486/bits/atomic.h: Likewise.

	* po/sv.po: Update from translation team.

2006-10-07  Ulrich Drepper  <drepper@redhat.com>

	* Versions.def: Add GLIBC_2.6 to libpthread.

	* include/shlib-compat.h (SHLIB_COMPAT): Expand parameters before use.
	(versioned_symbol): Likewise.
	(compat_symbol): Likewise.

	* po/tr.po: Update from translation team.
	* nis/Banner: Removed.  It's been integral part forever and the
	author info is incomplete anyway.
	* libio/Banner: Likewise.

2006-10-06  Ulrich Drepper  <drepper@redhat.com>

	* version.h (VERSION): Bump to 2.5.90 for new development tree.
2007-01-11 21:51:07 +00:00
Jakub Jelinek 32c075e1f0 . 2007-07-31 13:33:18 +00:00
Jakub Jelinek e013caa79f * elf/elf.h (R_MIPS_GLOB_DAT): Define.
(R_MIPS_NUM): Bump by 1.
2006-10-27  Richard Sandiford  <richard@codesourcery.com>

	* elf/elf.h (R_MIPS_GLOB_DAT): Define.
	(R_MIPS_NUM): Bump by 1.
2007-01-08 13:09:54 +00:00
Ulrich Drepper 64a0aa0fac * 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.
2007-01-03 05:44:24 +00:00
Ulrich Drepper 594d423aa3 * elf/dl-support.c: Include dl-procinfo.h.
* sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4,
	PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS,
	PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X):
	Define.
	(_dl_string_platform): Use PPC_PLATFORM_* macros instead of
	hardcoded constants.
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use
	PPC_PLATFORM_* macros for array designators.

2006-11-11  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap
	names to the beginning.
	(_dl_powerpc_platforms): Add "power6x".
	* sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease.
	(HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP.
	(_DL_PLATFORMS_COUNT): Increase.
	(_dl_string_platform): Handle power6x case.
	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP,
	PPC_FEATURE_POWER6_EXT): Define.
	(PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment.
2006-12-19 15:30:39 +00:00
Ulrich Drepper 6decd24cc2 [BZ #3483]
* elf/ldconfig.c (main): Call setlocale and textdomain.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.
2006-11-10 21:12:47 +00:00
Ulrich Drepper e1b370832c [BZ #3465]
* sunrpc/clnt_raw.c: Minimal message improvements.
	* sunrpc/pm_getmaps.c: Likewise.
	* nis/nss_nisplus/nisplus-publickey.c: Likewise.
	* nis/nis_print_group_entry.c: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* elf/dl-deps.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* libio/vswprintf.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/rpc_main.c: Likewise.
	* nscd/cache.c: Likewise.
	* locale/programs/repertoire.c: Unify output messages.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* nscd/selinux.c: Likewise.
	* elf/cache.c: Likewise.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.
2006-11-10 20:55:22 +00:00
Ulrich Drepper 2692deea65 * elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0
rather than r->r_brk.

2006-11-08  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-load.c (decompose_rpath): Return bool rather than void.
	If l->l_name is on inhibit_rpath list, set sps->dirs to -1 and
	return false, otherwise return true.
	(cache_rpath): Return decompose_rpath return value.

2006-11-07  Jakub Jelinek  <jakub@redhat.com>

	* include/libc-symbols.h (declare_symbol): Rename to...
	(declare_symbol_alias): ... this.  Add ORIGINAL argument, imply
	strong_alias (ORIGINAL, SYMBOL) in asm to make sure it preceedes
	.size directive.
	* sysdeps/gnu/errlist-compat.awk: Adjust for declare_symbol_alias
	changes.
	* sysdeps/gnu/siglist.c: Likewise.
2006-11-09 16:12:22 +00:00
Ulrich Drepper b94817f913 * elf/dl-sym.c (do_sym): Use RTLD_SINGLE_THREAD_P.
* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Likewise.
	* elf/dl-close.c (_dl_close_worker): Likewise.
	* elf/dl-open.c (_dl_open_worker): Likewise.
	* sysdeps/generic/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define.
2006-10-29 21:46:32 +00:00
Ulrich Drepper 78fbd00f39 * configure.in: Require assembler support for visibility, compiler
support for visibility and aliases, linker support for various -z
	options.
	* Makeconfig: Remove conditional code which now is unnecessary.
	* config.h.in: Likewise.
	* config.make.in: Likewise.
	* dlfcn/Makefile: Likewise.
	* elf/Makefile: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/libc-symbols.h: Likewise.
	* include/stdio.h: Likewise.
	* io/Makefile: Likewise.
	* io/fstat.c: Likewise.
	* io/fstat64.c: Likewise.
	* io/fstatat.c: Likewise.
	* io/fstatat64.c: Likewise.
	* io/lstat.c: Likewise.
	* io/lstat64.c: Likewise.
	* io/mknod.c: Likewise.
	* io/mknodat.c: Likewise.
	* io/stat.c: Likewise.
	* io/stat64.c: Likewise.
	* libio/stdio.c: Likewise.
	* nscd/Makefile: Likewise.
	* stdlib/Makefile: Likewise.
	* stdlib/atexit.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/i386/sysdep.h: Likewise.
	* sysdeps/i386/i686/memcmp.S: Likewise.
	* sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
2006-10-28 06:44:41 +00:00