summaryrefslogtreecommitdiff
path: root/glibc/debugging/ld_so_console.mdwn
diff options
context:
space:
mode:
authorArne Babenhauserheide <arne_bab@web.de>2011-10-04 17:22:17 +0200
committerArne Babenhauserheide <arne_bab@web.de>2011-10-04 17:22:17 +0200
commitd0bdae24b59dde1783f928992d414f608a42b266 (patch)
tree052e5254f6207fa384bdddd64b5580d0718b83c4 /glibc/debugging/ld_so_console.mdwn
parentcf1d668a185777e48faa180f201f58f93dcf3950 (diff)
parent67f614c029ba729a9451e87c4885c198fc10251b (diff)
manual merge
Diffstat (limited to 'glibc/debugging/ld_so_console.mdwn')
-rw-r--r--glibc/debugging/ld_so_console.mdwn20
1 files changed, 20 insertions, 0 deletions
diff --git a/glibc/debugging/ld_so_console.mdwn b/glibc/debugging/ld_so_console.mdwn
new file mode 100644
index 00000000..b3d1762f
--- /dev/null
+++ b/glibc/debugging/ld_so_console.mdwn
@@ -0,0 +1,20 @@
+[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+If you need to debug something in the early `ld.so` startup, and can't refrain
+from good old `printf` debugging, there is a caveat: the available API in
+`ld.so` is rather limited. See the few functions is `dl-sysdep.c`. For
+example, there's a private `__libc_write`, which you should be able to use for
+writing to FD stderr -- but, at early `ld.so` startup, this isn't usable as
+`_hurd_init_dtable` is still all zeros, etc. To get you started, here is a
+simple [[dl-sysdep.c.patch]] to get access to the Mach console.
+
+Can this be integrated with the other debugging printf functions from
+`elf/dl-misc.c` (`_dl_debug_vdprintf`) ([[!taglink open_issue_glibc]])?