gold linker v2.22: Fix constructor handling
authorJohn Marino <dragonflybsd@marino.st>
Tue, 3 Jan 2012 10:50:54 +0000 (11:50 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Tue, 3 Jan 2012 17:47:49 +0000 (18:47 +0100)
commit17078250df568635285cd6be4515d29ee8c1b72a
treea05765a9383c4a8cbe5cca235586d8cb1cace5c3
parent3c7587607776f143f9793ad05356ba5ac0941a0e
gold linker v2.22: Fix constructor handling

Starting with gold 2.22, gold looks for contructors in DT_INIT_ARRAY by
default, but gcc defines them in a .ctors section.  Apparently the
presence of crtbegin and crtend with their .init sections are confusing
gold, but not gnu ld.

To combat this, a new option "--no-ctors-in-init-array" was added to
emulate gnu ld behavior of looking for constructors in the .ctors
section provided by gcc.  This commit makes this new option the default
behavior on DragonFly's gold.

Without this modification, a gold-built world is unbootable!
contrib/binutils-2.22/README.DRAGONFLY
contrib/binutils-2.22/gold/options.h