Commit Graph

2161 Commits

Author SHA1 Message Date
Roland McGrath
3d3436ae68 Consolidate declarations of _dl_phdr, _dl_phnum. 2013-03-28 15:33:57 -07:00
Andreas Schwab
aaa8cb4b43 Add support for rtld directory different from slib directory 2013-03-19 12:07:26 +01:00
Roland McGrath
aefc9b8c7c Clean up _dl_pagesize initialization. 2013-03-15 14:35:17 -07:00
Roland McGrath
7775448e57 Fix NEED_DL_SYSINFO_DSO conditionals. 2013-03-01 14:44:44 -08:00
Petr Machata
08cbd996d3 Add ARM relocation constants to elf/elf.h. 2013-02-20 16:19:04 +00:00
Mike Frysinger
6ff444c418 unify xmalloc prototypes & friends
These prototypes are duplicated in many places.  Add a dedicated
header for holding prototypes for program-specific functions to
avoid that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-18 17:16:05 -05:00
Siddhesh Poyarekar
be179c8a36 New function _dl_find_dso_for_object
Consolidate code to search for an address within a DSO.
2013-02-18 18:00:17 +05:30
Andreas Jaeger
f238fd190b Sort Versions files 2013-02-17 16:34:04 +01:00
Joseph Myers
2bdd4ca6b6 Remove miscellaneous bounded-pointers relics in C code. 2013-02-15 00:51:53 +00:00
Joseph Myers
e97ed6ddbe Remove bp-sym.h and BP_SYM uses from C code. 2013-02-14 13:12:02 +00:00
Joseph Myers
70d9946a44 Remove __ptrvalue, __bounded and __unbounded. 2013-02-13 23:30:40 +00:00
Carlos O'Donell
b2d3c3befb Add more comments to _dl_load_cache_lookup().
Calling _dl_load_cache_lookup will load the cache if not already.
If loading the cache fails no more attempts will be made to load
the cache.
2013-02-08 12:55:34 -05:00
Carlos O'Donell
b39949d211 ARM: Support loading unmarked objects from cache.
ARM now supports loading unmarked objects from
the dynamic loader cache. Unmarked objects can
be used with the hard-float or soft-float ABI.
We must support loading unmarked objects during
the transition period from a binutils that does
not mark objects to one that does mark them with
the correct ELF flags.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
2013-02-08 12:26:12 -05:00
Roland McGrath
f1d70dad53 Remove lots of inline keywords. 2013-02-07 14:44:18 -08:00
Roland McGrath
573c29b288 Replace an alloca use with a variable-length array. 2013-02-05 12:15:56 -08:00
Andreas Schwab
903ae060db Don't use GLIBC_PRIVATE errno outside of libraries 2013-02-04 10:01:54 +01:00
Jan Kratochvil
542f94662e Improve link_map.l_addr comment. 2013-02-02 10:29:17 +01:00
Adam Conrad
5655a0b58e Build elf/tst-array2 and elf/tst-array5 with --no-as-needed
* elf/Makefile (LDFLAGS-tst-array2): Add $(no-as-needed).
	(LDFLAGS-tst-array5): Likewise.
2013-01-22 23:05:33 -07:00
H.J. Lu
22676eafed Implement x86 SIZE32/SIZE64 relocations 2013-01-16 20:31:03 -08:00
Steve Ellcey
0e8529e94f 2013-01-11 Steve Ellcey <sellcey@mips.com>
* elf/elf.h (EF_MIPS_ARCH_32): Fix value.
	(EF_MIPS_ARCH_64): Fix value.
	(EF_MIPS_ARCH_32R2): New.
	(EF_MIPS_ARCH_64R2): New.
2013-01-11 11:20:05 -08:00
H.J. Lu
740b3dbee8 Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
Roland McGrath
e7f68ef4bc Fix whitespace in elf.h MIPS macros. 2013-01-10 14:55:27 -08:00
Joseph Myers
828beb132d Use __extension__ with long long in installed headers. 2013-01-10 20:19:45 +00:00
Joseph Myers
568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers
f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
David S. Miller
0549fbba96 Update copyright years.
* catgets/gencat.c: Update copyright year.
	* csu/version.c: Likewise.
	* debug/catchsegv.sh: Likewise.
	* debug/pcprofiledump.c: Likewise.
	* debug/xtrace.sh: Likewise.
	* elf/ldconfig.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/pldd.c: Likewise.
	* elf/sotruss.ksh: Likewise.
	* elf/sprof.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* login/programs/pt_chown.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/memusagestat.c: Likewise.
	* malloc/mtrace.pl: Likewise.
	* nscd/nscd.c: Likewise.
	* nss/getent.c: Likewise.
	* nss/makedb.c: Likewise.
	* posix/getconf.c: Likewise.
2013-01-01 00:11:43 -08:00
Andreas Jaeger
af5843efa0 Add values from Linux 3.7 to <elf.h> 2012-12-28 13:06:01 +01:00
Carlos O'Donell
c93ec1f091 Warn about unsupported DT_FLAGS_1 flags.
The dynamic loader will now warn about unsupported DT_FLAGS_1
flags when run with LD_DEBUG=files or LD_DEBUG=all.
2012-11-29 18:12:23 -08:00
H.J. Lu
c515fb5148 Cast to __intptr_t before casting pointer to int64 2012-11-26 16:45:36 -08:00
Andreas Schwab
d260b3b403 sotruss: fix argument parsing 2012-11-26 20:58:27 +01:00
Mike Frysinger
800938a126 use $(READELF) rather than readelf
We setup $(READELF) and use it everywhere, so fix the two places
that were using readelf directly.

Reported-by: Denis M. <god@politeia.in>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-23 15:23:18 -05:00
H.J. Lu
7e1be74125 Check supported DF_1_XXX bits 2012-11-21 06:33:19 -08:00
Steve McIntyre
1f51ee9246 Add ldconfig cache tag handling for AArch64
* sysdeps/generic/ldconfig.h (FLAG_AARCH64_LIB64): New macro.
	* elf/cache.c (print_entry): Print ",AArch64" for
	FLAG_AARCH64_LIB64.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
2012-11-19 01:22:33 -05:00
Steve McIntyre
6665d4a25d Add ldconfig cache tag handling for ARM hard-float ABI
* sysdeps/generic/ldconfig.h (FLAG_ARM_LIBHF): New macro.
	* elf/cache.c (print_entry): Print ",hard-float" for
	FLAG_ARM_LIBHF.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
2012-11-19 01:12:53 -05:00
Joseph Myers
150dc1a05a Remove ELF_MACHINE_NO_PLT conditionals. 2012-11-17 01:51:20 +00:00
H.J. Lu
bcbf9830b7 Set constructor/destructor priority to 1000 2012-11-16 07:40:38 -08:00
H.J. Lu
2e64d2659d Skip audit if l_reloc_result is NULL 2012-11-14 15:44:40 -08:00
Joseph Myers
8b748aed2a Support --with-pkgversion and --with-bugurl. 2012-11-09 22:13:45 +00:00
Marcus Shawcroft
57241e26e5 Adjust comment above AArch64 relocs. 2012-11-08 08:19:30 +00:00
Marcus Shawcroft
19b2ecfcae Adding AArch64 support to elf/elf.h 2012-11-07 13:32:08 +00:00
Chris Metcalf
105ca950d9 elf.h: add new tilegx relocations (copy from binutils trunk) 2012-11-03 08:43:11 -04:00
Thomas Schwinge
d0d4f8689d Fix build for !(defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO). 2012-11-01 21:24:44 +01:00
Joseph Myers
df61ffb2ac Support cross-testing for elf/tst-array*. 2012-10-30 23:14:33 +00:00
Chris Metcalf
47cc1490e0 Invoke DL_AFTER_LOAD if defined
This hook is useful for any arch-specific functionality that
should be done on loaded objects.  For the tile architecture,
the hook is already provided (though we switch to using the new
macro name with this commit) and implements a simulator notifier
so that the simulator can load Elf symbols to match the object
and generate better error messages for PC's.

Also, remove a spurious definition of DL_UNMAP in dl-runtime.c
2012-10-30 14:16:18 -04:00
Andreas Jaeger
e5088dc687 [BZ#14767] Remove tests for have-initfini-array in elf/Makefile
* elf/Makefile (tests): Remove conditional for have-initfini-array
	since this is now always required and the variable does not exist
	anymore.
	(tests-static): Likewise.
	(modules-names): Likewise.
2012-10-30 09:07:01 +01:00
Andreas Jaeger
b0988f108c Fix fini_array and init_array sections
* elf/tst-array1.c (fini_array): Make writeable so that it can be
	merged with constructor/destructor.
	(init_array): Likewise.
	* elf/tst-array2dep.c (fini_array): Likewise.
	(init_array): Likewise.
2012-10-30 08:59:42 +01:00
Joseph Myers
cc1290d07e Support cross-testing. 2012-10-24 21:59:01 +00:00
Joseph Myers
03ac099f6b Define and use $(run-built-tests). 2012-10-24 00:08:46 +00:00
Jim Blandy
166bca2480 Add and use $(host-built-program-cmd). 2012-10-23 22:49:59 +00:00
H.J. Lu
f2eed20524 Check the main application only if SHARED is defined 2012-10-20 16:16:59 -07:00
Siddhesh Poyarekar
88481c1638 Retry read in ld.so if the entire ELF header is not read in
[BZ #13601]

A read operation could return less than requested data for a number of
reasons.
2012-10-20 08:03:54 +05:30
H.J. Lu
53cea63e99 Move _dl_important_hwcaps to dl-hwcaps.c 2012-10-05 10:26:29 -07:00
H.J. Lu
bb859b06dd Set GL(dl_nns) to 1 for vDSO in libc.a 2012-10-05 10:22:14 -07:00
H.J. Lu
9cee558564 Set up the data structures for vDSO in libc.a 2012-10-05 10:20:39 -07:00
Roland McGrath
f57f805541 Clean up conditionalize of ld.so.cache support. 2012-10-03 16:13:14 -07:00
Roland McGrath
408223d403 Use ElfW(Off) rather than off_t for offsets within ELF files. 2012-10-02 16:02:56 -07:00
Roland McGrath
91363dbbb9 Conditionalize elf/dl-sysdep.c contents on [SHARED]. 2012-09-28 14:29:14 -07:00
H.J. Lu
9bac1d8624 Define VERSYMIDX/VALIDX/ADDRIDX in ldsodefs.h 2012-09-28 11:30:57 -07:00
Dmitry V. Levin
57c69bef13 Set "fail on error" mode directly in testsuite shell scripts 2012-09-25 02:48:31 +00:00
Dmitry V. Levin
f3fd569c36 rtld: limit self loading check to normal mode only
Commit glibc-2.14~10 disallowed rtld self loading to avoid a segfault
that used to happen when rtld was loading itself in normal mode.
Unfortunately, that commit disallowed all modes of self loading,
including those that used to work before.  This change limits the check
for self loading to normal mode only, so that instruments like ldd could
handle rtld properly.
2012-09-19 21:28:13 +00:00
H.J. Lu
04570aaa8a Restore GL(dl_initial_dtv) 2012-09-06 16:29:10 -07:00
H.J. Lu
b80af2f406 Remove _dl_initial_dtv
* csu/libc-tls.c (static_dtv): Renamed to ...
	(_dl_static_dtv): This.  Make it global.
	(_dl_initial_dtv): Removed.
	(__libc_setup_tls): Updated.
	* elf/dl-tls.c (DL_INITIAL_DTV): New macro.
	(_dl_deallocate_tls): Replace GL(dl_initial_dtv) with
	DL_INITIAL_DTV.
2012-09-06 16:03:32 -07:00
Petr Machata
2abe9f1507 Synchronize with linux/elf.h.
Add new ARM and s390 note constants e.g. NT_*.
2012-09-06 12:41:14 -07:00
H.J. Lu
0948c3af9d Always check dtv before freeing dtv[-1] 2012-09-06 11:51:52 -07:00
Steve McIntyre
d3bafbc98e Check floating-point ABI in ARM VALID_ELF_HEADER. 2012-08-23 20:38:25 +00:00
Roland McGrath
c0f4faf046 Fix conditional on using DSOCAPS to match condition on defining it. 2012-08-20 09:51:04 -07:00
Roland McGrath
2ae1ae5cf4 Change type of constant to avoid a warning. 2012-08-17 11:17:04 -07:00
Roland McGrath
b7c08a66f6 Add a cast to silence a warning. 2012-08-17 09:49:37 -07:00
Gary Benson
d9195db871 Also set r->r_map when unmapping the first object in a namespace.
When unmapping the first object in a namespace, the runtime linker
did not update the externally visible pointer.  This resulted in
debuggers seeing pointers to memory that had been freed.
2012-08-17 11:44:37 +01:00
Roland McGrath
4b4f2771c2 Fix dl-load.c for [!_LIBC_REENTRANT] case. 2012-08-15 17:05:10 -07:00
Roland McGrath
176790a734 Add a missing #include to dl-sym.c. 2012-08-15 17:02:22 -07:00
Roland McGrath
1ec79f2673 Add a missing #include. 2012-08-14 16:44:27 -07:00
Roland McGrath
5908bf4662 Add a missing #include. 2012-08-14 16:04:29 -07:00
Mark Salter
33b4a91e5b Add new AM33 relocs 2012-08-08 21:43:47 -04:00
Roland McGrath
4f75b7a09a Distinguish ELOOP diagnosis threshold from SYMLOOP_MAX. 2012-08-03 11:39:30 -07:00
Marek Polacek
b67e9372b2 Get rid of ASM_TYPE_DIRECTIVE{,_PREFIX}. 2012-08-02 21:04:29 +02:00
Roland McGrath
bea9b19322 Fix lots of bitrot for stub configurations. 2012-07-30 16:34:33 -07:00
Gary Benson
815e6fa3e0 Add SystemTap static probes to the runtime linker. [BZ #14298] 2012-07-27 14:03:20 +01:00
Joseph Myers
3129cfc6ec Move testsuite audit definitions to sysdeps tst-audit.h files. 2012-07-26 11:29:07 +00:00
Joseph Myers
0f48659e36 Move localplt baselines to sysdeps directories. 2012-07-20 19:20:34 +00:00
Andreas Krebbel
08f43f9bbf S/390: Add support for STT_GNU_IFUNC symbols.
Add support for STT_GNU_IFUNC symbols and the new R_390_IRELATIVE
relocation.  Provide optimized version of memcpy, memset, and memcmp
for z10 and z196.
2012-07-19 15:46:34 +02:00
Marek Polacek
05d723ab8d Fix a few typos. 2012-07-18 00:25:50 +02:00
Joseph Myers
cfc82fd8ac Split tls-macros.h into sysdeps directories. 2012-07-17 11:30:58 +00:00
Marek Polacek
7b8e0d49cb Get rid of ASM_GLOBAL_DIRECTIVE. 2012-07-10 14:30:24 +02:00
Joseph Myers
95f5a9a866 Avoid use of libgcc_s and libgcc_eh when building glibc. 2012-07-03 19:14:59 +00:00
Andreas Schwab
0479b305c5 Fix invalid memory access in do_lookup_x.
[BZ #13579] Do not free l_initfini and allow it to be reused
on subsequent dl_open calls for the same library. This fixes
the invalid memory access in do_lookup_x when the previously
free'd l_initfini was accessed through l_searchlist when a
library had been opened for the second time.
2012-06-22 11:10:31 -07:00
Jeff Law
28363bbf70 2012-06-21 Jeff Law <law@redhat.com>
[BZ #13882]
        * elf/dl-deps.c (_dl_map_object_deps): Fix cycle detection.  Use
        uint16_t for elements in the "seen" array to avoid char overflows.
        * elf/dl-fini.c (_dl_sort_fini): Likewise.
        * elf/dl-open.c (dl_open_worker): Likewise.
2012-06-21 09:26:41 -06:00
Andreas Schwab
5be8418cb0 Remove use of INTDEF/INTUSE in stdio-common 2012-06-01 01:25:41 +02:00
Siddhesh Poyarekar
9c6ea9facb Fix stack size and address inconsistency due to executable stack
When a stack is marked executable due to loading a DSO that requires
an executable stack, the logic tends to leave out a portion of stack
after the first frame, thus causing a difference in the value returned
by pthread_getattr_np before and after the stack is marked
executable. It ought to be possible to fix this by marking the rest of
the stack as executable too, but in the interest of marking as less of
the stack as executable as possible, the path this fix takes is to
make pthread_getattr_np also look at the first frame as the underflow
end of the stack and compute size and stack top accordingly.

The above happens only for the main process stack. NPTL thread stacks
are not affected by this change.
2012-05-26 09:48:26 +05:30
Roland McGrath
3a097cc7a1 Add --enable-systemtap configuration to define static probe points. 2012-05-25 13:40:20 -07:00
Richard Henderson
c7683a6d02 Add <sys/auxv.h> and getauxval. 2012-05-20 10:40:35 -07:00
Andreas Jaeger
59910343fc Fix warning
Fixes:
tst-relsort1.c:6:1: warning: function declaration isn’t a prototype
[-Wstrict-prototypes]
2012-05-17 22:00:57 +02:00
Joseph Myers
a9538892ad Split up stackguard-macros.h into sysdeps directories. 2012-05-15 23:34:30 +00:00
Roland McGrath
ceb809dcae Use _dl_fatal_printf instead of a private variant. 2012-05-14 16:10:12 -07:00
H.J. Lu
9fb1a21f4d Add x32 support to STACK_CHK_GUARD 2012-05-11 16:31:34 -07:00
H.J. Lu
4822a2a520 Add x32 support to TLS_LE/TLS_IE/TLS_GD 2012-05-11 14:35:56 -07:00
H.J. Lu
df8a552f6f Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
Thomas Schwinge
6103ae3b0e Hurd: Build pldd also if use-ldconfig != yes || build-shared != yes 2012-05-10 15:57:26 -07:00
Andreas Jaeger
1db86e8845 Make ldconfig message clearer
[BZ #13983]
Let not confuse the user and think there's an error instead of
a warning.
2012-05-09 06:08:28 +02:00
Roland McGrath
d3dfcc4187 Fix make clean for recent elf/Makefile changes. 2012-05-03 09:52:47 -07:00
Allan McRae
d4c2917fc5 Fix test-suite failues with -Wl,--as-needed
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-05-02 20:32:50 -04:00
Paul Pluzhnikov
171a70b4c0 For PR 14055, add bounds check to _dl_show_auxv(). 2012-05-02 14:35:30 -07:00
Roland McGrath
f5a01ca927 Redirect check-localplt output to check-localplt.out. 2012-05-01 13:30:55 -07:00
Roland McGrath
90fe4186b3 Do check-localplt test using readelf rather than a build-time C program. 2012-05-01 13:30:35 -07:00
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