|
Message-ID: <20140619075014.GA30792@brightrain.aerifal.cx> Date: Thu, 19 Jun 2014 03:50:14 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: TLSDESC support added I've just committed a series of changes that add TLSDESC support (so far, i386 only, but that's mainly due to my lack of setup to test anything else; expect other archs in the next day or two). Related changes are detailed below: 1. Huge optimizations of __tls_get_addr Dynamic TLS on musl should now be considerably faster than on glibc. Several ingredients went into the optimization: - Separating the __tls_get_addr common path from the slow path to "manually shrink-wrap" the function. - Assembly code for ___tls_get_addr (3 underscores), the i386-specific function with a regparm calling convention, to actually do the work rather than pushing its argument to the stack and calling __tls_get_addr. - Powerful new invariant: the DTV never contains gaps. Now a single comparison (rather than needing a comparison followed by a null check) is sufficient to determine whether TLS for a given module is alredy installed and directly accessible via the fast path. These optimizations also (equally) affect the performance of dynamic TLS using TLSDESC. 2. Refactoring to remove per-arch code duplication Dynamic linker relocation operations are now all in dynlink.c rather than being duplicated across arch-specific files. This will help avoid subtle bugs when new archs are added or new features/reloc types are added. It also gives consistent support for both REL and RELA type reloc records across all archs. 3. Improved error handling/reporting The error code in the dynamic linker has been conslidated, and it's now able to report unknown reloc types rather than silently ignoring them. Further work on the dynamic linker will continue soon. Some tasks that are still needed include: - TLSDESC on all archs where it's defined. - Checking x32 and fixing anything that's wrong. - Better microblaze TLS support. - Timing the new code. :-) Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.