mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
parent
f19b269360
commit
3361651e9e
@ -53,6 +53,13 @@ namespace Linker {
|
||||
*/
|
||||
extern bool bind_now;
|
||||
|
||||
/**
|
||||
* Print diagnostic information
|
||||
*
|
||||
* The value corresponds to the config attribute "ld_verbose".
|
||||
*/
|
||||
extern bool verbose;
|
||||
|
||||
/**
|
||||
* Find symbol via index
|
||||
*
|
||||
|
@ -14,7 +14,7 @@
|
||||
/* Genode includes */
|
||||
#include <base/component.h>
|
||||
#include <base/printf.h>
|
||||
#include <os/config.h>
|
||||
#include <base/attached_rom_dataspace.h>
|
||||
#include <util/list.h>
|
||||
#include <util/string.h>
|
||||
#include <base/thread.h>
|
||||
@ -37,6 +37,7 @@ namespace Linker {
|
||||
|
||||
static Binary *binary = 0;
|
||||
bool Linker::bind_now = false;
|
||||
bool Linker::verbose = false;
|
||||
Link_map *Link_map::first;
|
||||
|
||||
/**
|
||||
@ -550,11 +551,13 @@ void Component::construct(Genode::Env &env)
|
||||
if (!Ld::linker()->file())
|
||||
Ld::linker()->load_phdr();
|
||||
|
||||
/* read configuration */
|
||||
/* read configuration, release ROM afterwards */
|
||||
try {
|
||||
/* bind immediately */
|
||||
bind_now = Genode::config()->xml_node().attribute("ld_bind_now").has_value("yes");
|
||||
} catch (...) { }
|
||||
Genode::Attached_rom_dataspace config(env, "config");
|
||||
|
||||
bind_now = config.xml().attribute_value("ld_bind_now", false);
|
||||
verbose = config.xml().attribute_value("ld_verbose", false);
|
||||
} catch (Genode::Rom_connection::Rom_connection_failed) { }
|
||||
|
||||
/* load binary and all dependencies */
|
||||
try {
|
||||
@ -566,7 +569,7 @@ void Component::construct(Genode::Env &env)
|
||||
|
||||
/* print loaded object information */
|
||||
try {
|
||||
if (Genode::config()->xml_node().attribute("ld_verbose").has_value("yes")) {
|
||||
if (verbose) {
|
||||
PINF(" %lx .. %lx: stack area",
|
||||
Genode::Thread::stack_area_virtual_base(),
|
||||
Genode::Thread::stack_area_virtual_base() +
|
||||
|
@ -11,9 +11,6 @@
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <os/config.h>
|
||||
|
||||
/* local includes */
|
||||
#include <linker.h>
|
||||
|
||||
@ -70,7 +67,7 @@ Genode::Shared_object::Shared_object(char const *file, unsigned flags)
|
||||
|
||||
/* print loaded object information */
|
||||
try {
|
||||
if (Genode::config()->xml_node().attribute("ld_verbose").has_value("yes"))
|
||||
if (Linker::verbose)
|
||||
Linker::dump_link_map(to_root(_handle)->dep.head()->obj);
|
||||
} catch (...) { }
|
||||
|
||||
|
@ -18,11 +18,10 @@
|
||||
#include <base/thread.h>
|
||||
#include <base/component.h>
|
||||
#include <base/heap.h>
|
||||
#include <os/config.h>
|
||||
#include <base/attached_rom_dataspace.h>
|
||||
#include <util/volatile_object.h>
|
||||
#include <cpu_session/connection.h>
|
||||
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
|
||||
@ -340,7 +339,7 @@ void Component::construct(Env &env)
|
||||
{
|
||||
log("--- thread test started ---");
|
||||
|
||||
Xml_node config = Genode::config()->xml_node();
|
||||
Attached_rom_dataspace config(env, "config");
|
||||
|
||||
try {
|
||||
test_stack_alloc(env);
|
||||
@ -348,7 +347,7 @@ void Component::construct(Env &env)
|
||||
test_main_thread();
|
||||
test_cpu_session(env);
|
||||
|
||||
if (config.has_sub_node("pause_resume"))
|
||||
if (config.xml().has_sub_node("pause_resume"))
|
||||
test_pause_resume(env);
|
||||
|
||||
test_create_as_many_threads(env);
|
||||
|
@ -1,3 +1,3 @@
|
||||
TARGET = test-thread
|
||||
SRC_CC = main.cc
|
||||
LIBS = base config
|
||||
LIBS = base
|
||||
|
Loading…
x
Reference in New Issue
Block a user