aboutsummaryrefslogtreecommitdiff
path: root/open_issues/binutils.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'open_issues/binutils.mdwn')
-rw-r--r--open_issues/binutils.mdwn205
1 files changed, 205 insertions, 0 deletions
diff --git a/open_issues/binutils.mdwn b/open_issues/binutils.mdwn
new file mode 100644
index 00000000..8d6b3a94
--- /dev/null
+++ b/open_issues/binutils.mdwn
@@ -0,0 +1,205 @@
+[[!meta copyright="Copyright © 2007, 2008, 2010, 2011, 2012 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]]."]]"""]]
+
+[[!tag stable_URL open_issue_binutils]]
+
+Here's what's to be done for maintaining GNU Binutils.
+
+As these tools primarily deal with low-level parts of the target architecture
+and the object file format (ELF ABI), which are essentially (at least meant to
+be) the same, there shouldn't be many differences comparing the binutils
+between the GNU/Hurd and GNU/Linux ports, for example. There are a few,
+though, as explained below.
+
+[[!toc levels=2]]
+
+
+# [[General information|/binutils]]
+
+
+# [[Sources|source_repositories/binutils]]
+
+
+# Configuration
+
+<!--
+
+git checkout reviewed
+git log --reverse --pretty=fuller --stat=$COLUMNS,$COLUMNS -p -C --cc ..sourceware/master
+-i
+/^commit |^---$|hurd|linux|nacl
+
+-->
+
+Last reviewed up to the [[Git mirror's dde164167b2db4c05d58b1941d610beb6d5ca99f
+(2012-06-08) sources|source_repositories/binutils]].
+
+ * Globally
+
+ * a.out (such as `ld/emulparams/i386linux.sh`, `ld/emultempl/linux.em`,
+ etc.), COFF, PE image support and 64-bit support are not interesting.
+
+ * In the testsuites, `.exp` and `.d` files very likely should not only
+ care for `*-*-linux*`, but also `*-*-gnu*`. (If they need to be
+ conditionalized like this at all.)
+
+ * `bfd/`
+
+ * `config.bfd`
+
+ * `i[3-7]86-*-gnu*`
+
+ Comparing to `i[3-7]86-*-linux-*`:
+
+ * `i386linux_vec` -- a.out.
+
+ * `i386pei_vec` -- PE.
+
+ * 64 bit.
+
+ * `configure.host`
+
+ Souldn't need anything. x86 Linux neither.
+
+ * `configure.in`
+
+ Linux:
+
+ * `COREFILE=trad-core.lo` with `TRAD_HEADER='"hosts/i386linux.h"'`
+
+ We don't have any such core file support configured. TODO: should
+ we? Where is this core file reading exactly used? GDB?
+
+ * `i386linux_vec` -- a.out.
+
+ * `i386pei_vec` -- PE.
+
+ * `binutils/`
+
+ * `configure.tgt`
+
+ * `gas/`
+
+ * `config/te-gnu.h`
+
+ C.f. `te-linux.h`; search tree for `TE_LINUX` vs. `TE_GNU` usage.
+
+ * `tc-i386.h`
+
+ Sole `TE_LINUX` usage is for a.out.
+
+ * `configure.tgt`
+
+ * `ld/`
+
+ * `configure.host`
+
+ * `*-*-gnu*`
+
+ TODO: resolve `crt0.o` vs. `crt1.o` issue. [[Testsuite
+ failures|binutils#static]].
+
+ * `configure.tgt`
+
+ * `i[3-7]86-*-gnu*`
+
+ Compare to `i[3-7]86-*-linux-*`, but don't need a.out (`i386linux`)
+ and 64 bit support.
+
+
+# Build
+
+Here's a log of a binutils build run; this is from our [[Git repository's
+e1104996559067c40207c803ab1a5847a4a05145 (2012-06-07)
+sources|source_repositories/binutils]], run on kepler.SCHWINGE and
+coulomb.SCHWINGE.
+
+ $ export LC_ALL=C
+ $ ../master/configure --prefix="$PWD".install SHELL=/bin/dash CC=gcc-4.6 CXX=g++-4.6 2>&1 | tee log_build
+ [...]
+ $ make 2>&1 | tee log_build_
+ [...]
+
+Different hosts may default to different shells and compiler versions; thus
+harmonized.
+
+This takes up around 120 MiB, and needs roughly 4 min on kepler.SCHWINGE and
+15 min on coulomb.SCHWINGE.
+
+<!--
+
+ $ (make && touch .go-install) 2>&1 | tee log_build_ && test -f .go-install && (make install && touch .go-check) 2>&1 | tee log_install && test -f .go-check && make -k check 2>&1 | tee log_check
+
+-->
+
+
+## Analysis
+
+x86 GNU/Linux' and GNU/Hurd's configurations are slightly different, thus mask
+out most of the differences that are due to GNU/Linux supporting more core file
+formats, and more emulation vectors.
+
+ $ ssh kepler.SCHWINGE 'cd tmp/source/binutils/ && cat hurd/master.build/log_build* | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > toolchain/logs/binutils/linux/log_build
+ $ ssh coulomb.SCHWINGE 'cd tmp/binutils/ && cat hurd/master.build/log_build* | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > toolchain/logs/binutils/hurd/log_build
+ $ diff -wu <(sed -f toolchain/logs/binutils/linux/log_build.sed < toolchain/logs/binutils/linux/log_build) <(sed -f toolchain/logs/binutils/hurd/log_build.sed < toolchain/logs/binutils/hurd/log_build) > toolchain/logs/binutils/log_build.diff
+
+
+# Install
+
+ $ make install 2>&1 | tee log_install
+ [...]
+
+This takes up around 70 MiB, and needs roughly 1 min on kepler.SCHWINGE and 3
+min on coulomb.SCHWINGE.
+
+
+## Analysis
+
+ $ ssh kepler.SCHWINGE 'cd tmp/source/binutils/ && cat hurd/master.build/log_install | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > toolchain/logs/binutils/linux/log_install
+ $ ssh coulomb.SCHWINGE 'cd tmp/binutils/ && cat hurd/master.build/log_install | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > toolchain/logs/binutils/hurd/log_install
+ $ diff -wu <(sed -f toolchain/logs/binutils/linux/log_install.sed < toolchain/logs/binutils/linux/log_install) <(sed -f toolchain/logs/binutils/hurd/log_install.sed < toolchain/logs/binutils/hurd/log_install) > toolchain/logs/binutils/log_install.diff
+
+ * `libtool: finish`: `ldconfig` is not run for the Hurd.
+
+
+# Testsuite
+
+ $ make -k check
+ [...]
+
+This needs roughly 3 min on kepler.SCHWINGE and 13 min on coulomb.SCHWINGE.
+
+ $ ssh kepler.SCHWINGE 'cd tmp/source/binutils/ && cat hurd/master.build/*/*.sum hurd/master.build/*/*/*.sum | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > toolchain/logs/binutils/linux/sum
+ $ ssh coulomb.SCHWINGE 'cd tmp/binutils/ && cat hurd/master.build/*/*.sum hurd/master.build/*/*/*.sum | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > toolchain/logs/binutils/hurd/sum
+ $ diff -u -F ^Running toolchain/logs/binutils/linux/sum toolchain/logs/binutils/hurd/sum > toolchain/logs/binutils/sum.diff
+
+
+## Analysis
+
+ * <a name="static"><!-- stable_URL -->`FAIL: static [...]`</a>
+
+ The testsuite isn't prepared for using `crt0.o` instead of `crt1.o`
+ depending on whether a static or dynamic executable is created. Documented
+ in `ld/configure.host`. Perhaps we should finally rewrite this messy code
+ in glibc?
+
+ * <a name="64ksec">`FAIL: ld-elf/64ksec`</a>
+
+ On the idle grubber, this one takes a few minutes wall time to complete
+ successfully ([[I/O system
+ weakness|performance/io_system/binutils_ld_64ksec]]), so assuming some
+ system load variation, the testsuite's timeout may trigger.
+
+ * <a name="weak"><!-- stable_URL -->`FAIL: ELF weak [...]`</a>
+
+ [[I|tschwinge]] suppose this is due to us having an override w.r.t. weak
+ symbol handling in glibc, needed for our external [[/libpthread]]. TODO:
+ document properly.