Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 9c53800a82 Bug 1081034 part 2 - Move initialization of self_elf to its own separate class. r=nfroyd
The new class is kind of like SystemElf, but using our linker's own symbol
resolution. This also adds some initialization from ELF program headers that
weren't done previously for self_elf, as well as registration as for CustomElf
instances.
2014-10-16 09:20:06 +09:00
Mike Hommey 84f2c13cef Bug 1078837 part 2 - Replace IsSystemElf/reinterpret_cast dance with better API. r=nfroyd 2014-10-16 09:19:45 +09:00
Mike Hommey eb89afceec Bug 1083020 - Add a (dummy) stats method to all LibHandles. r=nfroyd
While here, avoid doing anything if debug logging is disabled.
2014-10-16 09:19:40 +09:00
Mike Hommey 464da0f9c2 Bug 1077384 - Make libmozglue a pseudo-LD_PRELOAD on android. r=nfroyd
In order to avoid adding more dlsym overhead than there already is, resolve
symbols directly in the library containing the linker. (GetSymbolPtr is
essentially free ; dlsym makes the system linker compule a ElfHash itself,
and that's quite expensive to do on all symbols)

This also paves the way for direct symbol resolution in all system libraries.
2014-10-07 07:42:18 +09:00
Jim Chen ead154121a Bug 1066760 - Redirect mozalloc_abort through Java exception handling; r=snorp 2014-09-24 14:12:54 -04:00
Jim Chen f3c570c80b Bug 1066760 - Add base address and fall back to system dladdr in __wrap_dladdr; r=froydnj 2014-09-24 14:12:54 -04:00
Mike Hommey 15851645b4 Bug 1036286 - Delay registration of the faulty.lib signal handler until when it's necessary. r=nfroyd
It's necessary to delay it because for the second part, we need to call dlopen,
and until recently bionic's linker dead-locked when using dlopen from a static
initializer.
2014-08-07 02:51:03 +09:00
Mike Hommey 8c39460da9 Backout changeset 34235900c3a0 (bug 1036286) because it wasn't the right fix. 2014-08-05 16:07:06 +09:00
Mike Hommey 1e14ec2f14 Bug 1036286 - Make sure libraries loaded by faulty.lib use its own sigaction. r=nfroyd
Android L added a libsigchain library it LD_PRELOADs. That library exposes
a different sigaction than libc's. It's used for ART.

faulty.lib gets its sigaction from libsigchain, but after bug 874708, the
libraries it loads simply use libc's sigaction, assuming it would be the
hooked one. In turn, this means libraries loaded by faulty.lib may
override faulty.lib's handler, which is definitely not the intent.

This essentially restores some of the code that bug 874708 removed.

An alternative fix would be to add support for LD_PRELOAD, but that has more
implications and feels more risky. This could be done, if necessary, as a
followup.
2014-07-24 13:43:56 +09:00
Nicholas Nethercote 2a0942be41 Bug 1036789 - Convert the third quarter of MFBT to Gecko style. r=Ms2ger.
--HG--
extra : rebase_source : 668cd394806203ddfa34bd4f226335ff26c846b5
2014-07-10 19:10:17 -07:00
Ehsan Akhgari 7257ee5010 Bug 1004564 - Move AtomicRefCounted to mozilla::external and outlaw it in Gecko code; r=froydnj 2014-05-01 14:33:20 -04:00
Ehsan Akhgari a8a0206da1 Bug 935778 - Part 1: Add RefCountType, a type compatible with nsrefcnt, to MFBT; r=dbaron,froydnj 2014-02-21 14:45:50 -05:00
Ehsan Akhgari 7e41f47adf Bug 935778 - Part 0.4: Spray even more MOZ_DECLARE_REFCOUNTED_TYPENAME across the tree 2014-02-21 09:11:33 -05:00
Birunthan Mohanathas c01f63b478 Bug 784739 - Switch from NULL to nullptr in mozglue/linker/; r=ehsan 2013-11-11 14:15:46 -05:00
Jim Chen 9705613071 Bug 930627 - Implement __gnu_Unwind_Find_exidx in custom linker on ARM. r=glandium 2013-10-31 11:40:32 -04:00
Mike Hommey f6addb05b1 Bug 886736 - Disable on-demand decompression when latency to get into segfault handlers is too high. r=nfroyd 2013-10-01 15:30:45 +09:00
Seth Fowler f9cdc752b1 Bug 912299 - Make RefCounted's refcount field mutable. r=waldo 2013-09-06 13:32:55 -07:00
Mike Hommey eb14682f30 Bug 907957 - Detect if a segfault signal handler is useless. If it is, disable on-demand decompression. r=nfroyd 2013-08-30 11:14:17 +09:00
Justin Lebar 051c5b560a Bug 802686 - s/MOZ_NOT_REACHED/MOZ_CRASH/ in Gecko. r=(see below)
r=tbsaunde for accessible
r=jmuizelaar for gfx
r=roc for layout
r=glandium for mozglue
r=jduell for netwerk
r=khuey for everything else

This is a mechanical change made with sed.  Later patches in this queue
clean up the whitespace errors and so on.
2013-06-28 18:38:30 -07:00
Mike Hommey 6d626eb6a0 Bug 885336 - Fix various issues with the dl_mmap interface. r=nfroyd 2013-06-27 09:35:48 +09:00
Mike Hommey 7a3c231b71 Bug 874708 - Hook libc's sigaction to avoid system libraries replacing our segfault handler temporarily and restoring it wrongly. r=nfroyd 2013-06-09 09:23:03 +02:00
Mike Hommey 5215bd9e2d Bug 865583 - Use thread-safe ref-counting in the linker. r=nfroyd 2013-05-18 09:53:18 +02:00
Mike Hommey 32f20f1c9f Bug 864035 - Add an atomic RefCounted and WeakPtr implementation. r=Waldo 2013-05-18 09:52:53 +02:00
Mike Hommey 1cb6364a2e Bug 802240 - Expose an API to mmap the underlying file for a library loaded by faulty.lib. r=nfroyd 2013-04-12 10:23:12 +02:00
Mike Hommey ce277304e9 Bug 842681 - Refactor the linker Zip code and allow to use an existing memory buffer as a Zip file. r=mwu 2013-03-08 09:24:46 +01:00
Mike Hommey 9446203c4a Bug 834459 - Specialize RefCounted template for LibHandle to better allow refcounting during destructor execution. r=nfroyd 2013-01-29 09:35:32 +01:00
Mike Hommey 3565792dc7 Bug 808121 - Ensure the pointers we change in the r_debug data are writable, which they aren't with upcoming Android system linker. r=nfroyd 2012-11-07 08:02:53 +01:00
Mike Hommey 2967371558 Bug 747033 - Implement dl_iterate_phdr in the custom linker. r=froydnj
--HG--
rename : mozglue/linker/CustomElf.h => mozglue/linker/Elfxx.h
2012-04-25 09:05:02 +02:00
Mike Hommey 8c5b3643ce Bug 686805 part 6 - Add functions to display stats about seekable compressed streams. r=tglek 2012-02-22 08:12:15 +01:00
Mike Hommey 3c9f465103 Bug 686805 part 2 - Use a SIGSEGV signal handler to handle segmentation faults happening in loaded libraries address space. r=tglek,r=sewardj 2012-02-22 08:12:15 +01:00
Mike Hommey 00ba5188c0 Bug 725230 - Enable and fix assertions in linker code. r=tglek 2012-02-13 15:49:45 +01:00
Mike Hommey 78f3656b4b Backout 8eef38643ceb (bug 717540) and 78941a969e20 (bug 725230) because of windows debug bustage 2012-02-13 16:35:13 +01:00
Mike Hommey 7fb8e3198a Bug 725230 - Enable and fix assertions in linker code. r=tglek 2012-02-13 15:49:45 +01:00
Mike Hommey 8fd7ef9ab5 Bug 683127 part 10 - Allow debug symbols to be found under gdb without extracted libraries. r=tglek,r=mwu 2012-01-20 09:49:03 +01:00
Mike Hommey 30eed017b6 Bug 683127 part 9 - Allow to temporarily extract Elf files from a Zip archive for e.g. valgrind. r=tglek 2012-01-20 09:48:50 +01:00
Mike Hommey 4b71ba5dc0 Bug 683127 part 8 - Allow to load Elf files from a Zip archive. r=tglek,r=sewardj 2012-01-20 09:48:44 +01:00
Mike Hommey 61d63022fa Bug 683127 part 7 - Use a custom Elf linker for libraries given with an absolute path name. r=sewardj 2012-01-20 09:48:44 +01:00
Mike Hommey 9907ad2018 Bug 683127 part 5 - Initial Elf Loader, wrapping around dlopen/dladdr/dlsym/dlclose. r=tglek,r=sewardj 2012-01-20 09:48:39 +01:00