Commit Graph

342 Commits

Author SHA1 Message Date
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
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
matt f126fa1c9a Add support for TLS relocations.
From Joerg Sonnenberger
2011-04-12 16:40:04 +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 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
skrll be1a58855d More PLABELS are required due to TLS stuff. 2011-03-14 08:49:29 +00:00
skrll d3aab036e1 Handle some TLS relocs. 2011-03-14 08:21:54 +00:00
skrll 92c298c3a1 First cut at mdtls.c for hppa. 2011-03-14 08:20:15 +00:00
joerg 854e6cd69f Add TLS support for AMD64, i386 and SH3.
This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-12 22:54:36 +00:00
matt 130f2d3d4c Add TLS support for PowerPC.
If the port has __lwp_gettcb_fast or __lwp_settcb use them instead of
__lwp_getprivate_fast or lwp_setprivate.
2011-03-12 07:43:53 +00:00
skrll ff1072d23a Whitespace. 2011-03-10 12:53:42 +00:00
matt 4fee4fe7b3 Don't rely on >32bit math. 2011-03-04 00:40:48 +00:00
matt 483a1c95a2 Fix problem with bss-plt objects which a reloc index, not offset.
(secure-plt uses an offset (index*sizeof(rela), bss-plt uses an index)
secure-plt will now take the offset and divide by 12 for an index.
2011-02-10 02:28:20 +00:00
matt d31dbd7578 Add secure-plt support for powerpc to ld.elf_so. As part of this, we have to
stop calling into the GOT/_DYNAMIC since they are no longer executable.
2011-01-16 01:22:29 +00:00
joerg 67e01e0a99 Build ld.elf_so with -fvisibility=hidden. Exploit this for i386/x86_64
to simplify the assembler code.
2010-12-05 00:56:06 +00:00
joerg 239c31f883 Add comment about the unusual stack alignment in .rtld_bind_start. 2010-12-03 22:48:25 +00:00
skrll 0e07ba7138 Add the magic branch instruction that is used by GCC's
__canonicalize_funcptr_for_compare() function to fixup relocations in
order to do function pointer comparisons.

From OpenBSD.
2010-09-30 19:32:40 +00:00
skrll 06acf46b03 Introduce a new type Elf_Symindx for use in decoding the symbol hash table
section and allow this type to be overridden.

The ELF specification says it should always be uint32_t (Elf_Word), but
alpha decided to be different (not sure why). Define Elf_Symindx to be
uint64_t on alpha.

Alpha no longer uses non-standard definitions of Elf64_Sword and
Elf64_Word.  Remove the ability to override these types.

Fixes ld.elf_so after Herculean effort from me and martin.
2010-09-30 09:11:18 +00:00
matt af56990d0c Make the GOT1_MASK 64-bit clean. 2010-09-24 15:20:52 +00:00
skrll 8f77c5159b Comment reformat. 2010-09-24 12:00:10 +00:00
skrll 2c56298dd9 Wrap long line. 2010-09-24 11:59:28 +00:00
skrll 09601c884f Whitespace. 2010-09-24 11:57:11 +00:00
skrll 6229c56fea Wrap long lines
Reformat comments.
2010-09-24 11:41:46 +00:00
joerg f40b256f09 Reduce header pollution for mdreloc.c. Make Obj_Entry argument of
_rtld_relocate_nonplt_objects non-const in preparation for TLS support.
2010-08-06 16:33:17 +00:00
mrg c8cf27943d make sure to look in CFLAGS, COPTS and CPPFLAGS for abi options.
fixes sgimips64 build of n64 ld.elf_so.
2010-07-11 07:43:12 +00:00
skrll 15b7ff0199 Make DEBUG build compile. 2010-01-14 12:12:07 +00:00
skrll f88b3d9061 Wrap a few long lines. 2010-01-14 11:58:31 +00:00
skrll c2796a5929 Shut gcc up. 2010-01-14 11:57:06 +00:00
skrll 8b4b9f3e56 Shut gcc up. 2010-01-13 22:34:07 +00:00
christos 12bd4dbd45 PR/39240: Satoshi Suetake: Don't fail when attempting to resolve weak symbols
when we are doing immediate binding, leave them alone and they will be dealt
with later during lazy binding. From skrll@
2010-01-13 20:17:21 +00:00
skrll 09298c1411 Small tidyup. 2010-01-09 15:36:43 +00:00
mrg 249d1f1111 use COPTS for -G0.
replace ${CPUFLAGS:M-mabi=64:M-mabi=o64} with two constructs.
the former doesn't seem to work anymore.
2009-12-18 17:10:07 +00:00
matt d8d1440d5c Merge from matt-nb5-mips64:
Add N32/N64 support for mips dynamic loader.
2009-12-14 00:41:18 +00:00
mrg 750ad3d59d simplify the logic for compat ld.elf_so and move it here. we now can
find the libc objdir for multiple compat ld.elf_so's, too.
2009-12-13 09:31:47 +00:00
mrg f7f0bc40ae rename LD32DIR to MLIBDIR. 2009-12-13 08:25:20 +00:00
skrll b9fe4e7d17 Add RCSID 2009-11-11 14:15:41 +00:00
skrll ef99e95537 Fix start symbols for new binutils. 2009-11-04 17:02:43 +00:00
skrll d43e9fc212 Fix start symbol for newer binutils. 2009-10-22 21:56:13 +00:00
skrll 15653ebb45 ld.elf_so grew more PLABELS with dlinfo so bump HPPA_PLABEL_PRE. 2009-09-25 17:49:56 +00:00
skrll ffb28af545 Fix start symbol. I have no idea how this worked before. 2009-09-19 14:54:17 +00:00
skrll 4b849729b2 Fix the start symbol. 2009-09-12 07:22:16 +00:00
jmmv 2cb749c2fd Remove trailing \n in calls to _rtld_error: a newline is automatically
added by a call to the function.
2009-08-29 13:46:54 +00:00
he 45932f91e5 Apply fix borrowed from i386: Fix const issue (cast const pointers
to "const uint8_t *" instead of "caddr_t").
2009-05-24 20:35:41 +00:00