Commit Graph

793 Commits

Author SHA1 Message Date
joerg
ba562931eb This version of __diagssert13 is dead. 2012-03-16 11:44:54 +00:00
christos
749108f9b9 Add __diagassert13() so that if libc is compiled with _DIAGNOSTIC, it does
not end up bringing in all of stdio.
XXX: This is temporary.
2012-03-15 00:16:07 +00:00
joerg
8ae54e9304 Mark _rtld_debug_state as not to be inlined. Add an explicit instruction
barrier to prevent removal of calls to it.
2012-03-13 21:00:31 +00:00
joerg
52a4c27e3e Add _dlauxinfo helper function to provide access to the ELF auxilary
vector. This can normally be found via __ps_strings, but libc is
initialised too early when linked dynamically and doesn't have access to
it yet, so provide an alternative mechanism via ld.elf_so.
Bump libc minor.
2012-02-16 23:00:38 +00:00
skrll
1b54bd1886 Implement lazy binding on hppa. rump_server needs it!?!?!
Mostly from OpenBSD.
2012-01-06 10:38:56 +00:00
joerg
e86a1635be Align in the stack before calling _rtld in the way the x86_64 ABI
specifies. This is necessary to ensure that init functions are always
called with the correct alignment, e.g. in case they use SSE
instructions.
2011-12-11 22:07:26 +00:00
joerg
934a3ac455 Mark xassert as __dead 2011-12-11 11:05:11 +00:00
skrll
df83e35987 Remove unused file. 2011-12-05 07:36:32 +00:00
skrll
248fe9e5bd Use the tlsoffset from the correct object. 2011-12-04 16:53:08 +00:00
skrll
8737e6c85f Restore backwards compatibility by removing unnecessary addition of
dlvsym to Obj_Entry.

Add some comments.
2011-12-02 09:06:49 +00:00
joerg
5b3faf1c05 Unbreak RTLD_NEXT and co on platforms that don't inline or tail call
do_dlsym.
2011-11-25 21:27:15 +00:00
joerg
7878f85385 Replace if() NADA else if() NADA else continue logic with one explicit
block. Split out the MIPS handling to make it explicit and readable.
2011-11-25 14:39:02 +00:00
joerg
6133e96c53 Add TLS support for m68k. 2011-11-22 15:25:28 +00:00
joerg
10dc456d4b Hook up TLS support on ARM. Tested by martin@, kernel support from matt@ 2011-11-18 16:10:02 +00:00
joerg
cc2f98ece2 FreeBSD bug report 161344: TLS area for the main thread is set up to
early, if e.g. pointers to functions are used as initializers.
2011-11-17 16:20:11 +00:00
chs
d7bbed6455 avoid linker warnings with the new binutils by not forcing ld.elf_so
to be soft-float.  the floating-point usage in ld.elf_so is only
because of stdarg functions like printf(), and gcc 4.5 is good
about not actually executing the FP instructions in such functions
unless FP values are passed to them, which ld.elf_so doesn't do.
2011-10-26 15:56:58 +00:00
christos
1f1b5ad097 Don't block SIGTRAP so that on architectures where the debugger needs to
be able to receive sigtrap for breakpoints to work, it can. For example
we are setting breakpoints inside dlopen(), after we've blocked the signal,
so the process keep trapping and looping over the trap instruction without
being able to send the signal. Another way would be to move the
_rtld_debug_state() calls outside the critical section...
2011-10-23 21:06:07 +00:00
mrg
4a9d1308c3 obsolete libgcc_pic and friends. all libgcc's are supposed to be pic
for platforms with shlibs already (and are.)

this obsoletes our hacks for the libgcc specs to use libgcc_pic, and
fixes a couple of other issues reported to me directly.
2011-10-07 09:15:21 +00:00
mrg
1862dafe3f match EXIT() with LEAF_ENTRY() so that sizes are actually constants.
fixes binutils 2.21 build issues reported by he and chuq.
2011-09-30 03:05:43 +00:00
mrg
b7e0bd3662 match END() with a relevant ENTRY*(). gas 2.21 complains about the
non-constant-ness of the symbol otherwise.
2011-09-26 01:52:22 +00:00
chs
b398f9d2e5 gcc 4.5 generates an extra plabel in ld.elf_so,
so expand the array of preallocated ones.
2011-09-25 13:34:54 +00:00
christos
c5e4118a6b consistent debugging info for program headers 2011-08-13 22:25:20 +00:00
christos
9813f2c42a printing the pathname of the shared object is much more useful than the
object's address.
2011-08-13 22:24:57 +00:00
christos
89c8b6528a disable debugging that makes us core dump 2011-08-13 22:24:24 +00:00
uwe
d1a523b49d sh3 also needs libgcc_pic for millicode (cf. revision 1.107) 2011-06-27 14:27:56 +00:00
nonaka
c52f9a5df2 PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.
2011-06-25 05:45:10 +00:00
christos
94e4c3614b Add libgcc_pic for millicode. 2011-06-05 23:08:17 +00:00
joerg
9ad3c16b3a Use -Wl,-Bsymbolic directly for clang 2011-05-30 16:30:01 +00:00
christos
b9972d39ce Don't use division since we are only dealing with powers of 2. 2011-05-25 14:41:46 +00:00
joerg
6c5e962381 Disable use of various X86 extensions since _rtld_bind_start doesn't
save the necessary registers.
2011-05-20 22:22:44 +00:00
joerg
5a156c51e2 Explicitly disable linking against libgcc and friends. 2011-05-20 22:21:32 +00:00
joerg
c5f8d1393d Fix a Freudian slip found by rmind 2011-04-23 16:40:08 +00:00
matt
f126fa1c9a Add support for TLS relocations.
From Joerg Sonnenberger
2011-04-12 16:40:04 +00:00
matt
14d704c9e9 Add a workaround for older crt0.o that overwrite r2 (tcb pointer).
(save tcb pointer using _lwp_setprivate in ld.elf_so and retrieve the tcb
via _lwp_getprivate in libc and use it to restore the value in r2).
2011-04-07 02:19:28 +00:00
joerg
278d108904 Revert pthread_atfork related change not intended for commit yet. 2011-04-02 16:49:49 +00:00
joerg
241421a0db Unbreak HPPA 2011-04-02 12:30:41 +00:00
skrll
45f37e968c Enable TLS for alpha - a 2nd class^Wtier system in pookaBSD^WNetBSD
alpha_reloc.c diff from joerg on port-alpha.
2011-03-31 15:30:31 +00:00
nakayama
dbbd50a95f Add missing comma. 2011-03-31 12:47:01 +00:00
martin
9f905ee41c Add support for TLS relocations 2011-03-30 09:22:29 +00:00
martin
3a4af49105 Add support for 64 bit TLS relocations. 2011-03-30 08:37:52 +00:00
joerg
8fa6585514 Block signals when using the exclusive lock. 2011-03-29 20:56:35 +00:00
joerg
e49f915c10 Refine locking scheme around init/fini to not hold the exclusive lock.
Use a simple generation count instead and restart looking for work if it
changed (e.g. due to an dlopen call from an init function).
Leave the possible dlclose() race for now.
2011-03-28 00:37:40 +00:00
joerg
7435c9ba49 exit, not enter 2011-03-27 22:20:51 +00:00
joerg
23a805d314 Handle _rtld_exit as full entry point since other threads may still be
running at the time.
2011-03-27 21:58:50 +00:00
joerg
2feaef06e3 Add some debug messages for explicit rtld entry points 2011-03-27 13:15:34 +00:00
joerg
0bc9be2143 Locking around dlclose() 2011-03-27 13:14:42 +00:00
joerg
d5a77cf108 Fix merge error that broke HPPA 2011-03-26 21:40:37 +00:00
joerg
cb1cd7e860 Add basic locking to ld.elf_so. 2011-03-25 18:07:04 +00:00
skrll
83c1874f74 Another TLS reloc. Thanks to joerg for a hint. 2011-03-17 22:07:52 +00:00
matt
7e7a53defe Add support for the MIPS TLS reloc types in shared libraries. 2011-03-15 07:40:52 +00:00