Avoid post-reloc GOT usage in __linker_init
A GOT lookup happening prior to soinfo::link_image causes a segfault. With -O0, the compiler moves GOT lookups from after __linker_init's link_image call to the start of __linker_init. Rename the existing __linker_init_post_relocation to linker_main, then extract the existing post-link_image code to a new __linker_init_post_relocation function. Bug: http://b/80503879 Test: /data/nativetest64/bionic-unit-tests/bionic-unit-tests Test: manual Change-Id: If8a470f8360acbe35e2a308b0fbff570de6131cf
Loading
Please sign in to comment