Skip to content

Commit

Permalink
mcpelauncher_linker_notifylldb (improve debugging)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHX committed May 15, 2023
1 parent dc03624 commit be272e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions linker/linker_soinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ void soinfo::call_pre_init_constructors() {
call_array("DT_PREINIT_ARRAY", preinit_array_, preinit_array_count_, false, get_realpath());
}

extern "C" void mcpelauncher_linker_notifylldb(const char* filename, size_t offset) {
_PRINTVF(-2, "mcpelauncher_linker_notifylldb %s 0x%llx", filename, (long long)offset);
}

void soinfo::call_constructors() {
if (constructors_called || g_is_ldd) {
return;
Expand Down Expand Up @@ -577,6 +581,8 @@ void soinfo::call_constructors() {
}
#endif

mcpelauncher_linker_notifylldb(get_realpath(), base);

// DT_INIT should be called before DT_INIT_ARRAY if both are present.
call_function("DT_INIT", init_func_, get_realpath());
call_array("DT_INIT_ARRAY", init_array_, init_array_count_, false, get_realpath());
Expand Down

0 comments on commit be272e4

Please sign in to comment.